15_041802 bindex.qxp4/2/075:24PMPage429 AllowPartiallyTrustedCallersAttribute Alignment 320 Advanced SecuritySettingsdialogbox, AdornerLayer 301 Administrator account, AddService Address.xaml.cs AddressTaskController AddressInfo AddressData.cs AddressData Address AddChild 406 Reference, Add Service 91 Add New Itemdialogbox, ControlPanel, Add andRemove Programsdialogbox, 278–286 269, adaptive topology, 306 AD (ActiveDirectory), 423 Activity Library, activities ActiveX 306 (AD), Active Directory Activated A While SequentialWorkflowActivity Sequence ifElse DisplayProduct Code 344–345 in XAML, 339 overview, 340–344 example, ATA trbt,314 (APTCA) attribute, 291 ciiy 2,423 420, activity, ciiy 2,422 420, activity, aefnto,25 266 265, page function, adding controls, ciiy 2,422 420, activity, ehd 364 method, rpry 99 property, 35 33, event, ciiy 420 activity, ehd 413 method, ls,23 265 263, class, bet 266 object, oto,9 control, ie 262 file, ie 275 file, COPYRIGHTED 420 activity, MATERIAL ls,267 class, ls,416 class, lh hne,160 alpha channel, apiainetnin 296 .application extension, Application 97 96, Appearance panel, AppDomain App.config 242 App_Code directory, AnimationDurationProperty Animation_Completed Animation API. animation AnimateFill( ) 188 Angle slider, Angle rgamtcaiain 139–143 programmatic animation, 135–138 creating dynamicanimationwithcode, 135 animation classes, 107–108 triggers, 104–105 Timeline sub-panel, templates 111–112 styles, 112–113 states, 139–143 programmatic animation, 106 of object’s property, 106–107 motion paths, 105–106 keyframes, 113 audio/videomedia, importing 135–138 creating procedurallywithcode, creating controls 135 animation classes, dtn,110 editing, 111 common elements, 110 styling, 108–109 overview, 110 editing, 109–110 control inheritance, rpry 186 property, 0,306 303, , ie 69 file, ls,24 363–364 254, class, See also ehd 5,152 151, method, animation ehd 0,202 200, method, rpry 200 property, Index
Index 15_041802 bindex.qxp 4/2/07 5:24 PM Page 430
application models
application models asynchronous threading browser-based applications BackgroundWorker object, 395–397 overview, 238 overview, 393–395 standalone or “loose” XAML, 239 attached property, 363 XAML browser applications, 239–246 attributes security considerations, 247–248 AllowPartiallyTrustedCallersAttribute standalone applications (APTCA) attribute, 314 overview, 235–236 BasedOn attribute, 225 windows, 236–237 Binding attribute, 56 windows navigation, 237–238 BorderBrush attribute, 219 Application object CanResize attribute, Window class, 288 obtaining reference to, 31 Category attribute, 290 overview, 30–31, 248–250 Click attribute, 381 sharing information, 31–32 ContentRendered attribute, 36 application trust, 323 declarative attributes, 73
430 15_041802 bindex.qxp 4/2/07 5:24 PM Page 431
change notification system Index AutoReverse property, 193 bubbling events, 39, 47 AxShockwaveFlashObjects namespace, 344 Build Action property, 197 AxShockwaveObjects namespace, 340 BuildWindowCore method, 332, 333 BulletPanel element, layout panels, 103 business processes, 409–410 B Button control, 14, 37, 366, 372 Background message priority, 390 button controls Background property, 166, 201 creating, 112–113 BackgroundWorker object, 395–397 styling, 112–113 BAML file, 374
431 15_041802 bindex.qxp 4/2/07 5:24 PM Page 432
CheckAccess method, DispatcherObject class
CheckAccess method, DispatcherObject class, 389 CommandBinding class, 48, 49 child elements, 44, 101, 104, 123, 289, 384 commands, 47–51 Cider. See Visual Designer Common Control Library, 2 class handlers, 11 Common Dialog Box Library, 2 Class1.cs file, 75–78 Common Language Runtime (CLR) Click attribute, 381 properties and XAML attributes, 384 Click event, Events view, 119, 371, 378, 379 security ClickOnce Code Access Security (CAS), 303–311 and application deployment, 291, 294 critical code methodology, 311–312 security overview, 302 overview, 323 verification, 313 permission settings, 318 Common Language Runtime Support property, 335 personal certificate file, 324–326 communication channels, 14 Trusted Publishers, 323 compile time, 269 clients, 400 ComponentCommands class, 47 clipping regions composite sites, 240 creating with geometry, 146–149 composition system, 9, 14–15, 356, 358–359 creating with shapes, 146–149 composition tree, 358 Closed event, 33, 35 CompositionTarget class, 129, 132, 139–143 Closing event, 33, 35 CompositionTarget.Rendering event handler, CLR (Common Language Runtime) 139, 148 properties and XAML attributes, 384 compound paths, 93–94 security Condition child elements, 226 Code Access Security (CAS), 303–311 ConditionName property, 422 critical code methodology, 311–312 .config file, 293 overview, 302 configuration utility, 69 verification, 313 configuring design environment, in Expression Blend, CNG (Cryptography API: Next Generation), 302 88–90 code Connect method, 377, 378 adding WindowsFormsHost in, 337–339 Contact PageFunction, 272 creating, 308–311 ContactData.cs file, 271 creating dynamic animation with, 135–138 content controls, 43, 109 editing with Visual Studio 2005, 117–118 Content property, 43, 109 Code Access Security (CAS) ContentPresenter element, 111, 366, 372 code groups, 306–307 ContentRendered attribute, 36 creating code groups for applications, 308–311 ContentRendered event, 33, 35, 36 evidence, 305–306 ContextIdle message priority, 390 overview, 303 Continue behavior, HitTestFilterBehavior “partial trust,” 316 enumeration, 127 permissions, 304 Continue value, HitTestResultCallback delegate, policy levels, 306 126 verification process, 303–304 ContinueLooping property, 421 zones, 305 ContinueSkipChildren behavior, HitTestFilter Code Access Security Policy Tool, 307 Behavior enumeration, 127 Code activity, 420, 423 ContinueSkipSelf behavior, HitTestFilter code groups, CAS, 306–307 Behavior enumeration, 127 Code Groups folder, 308 ContinueSkipSelfAndChildren behavior, code-behind file, 69 HitTestFilterBehavior enumeration, 127 CodeDom model, 374, 383 Contract layer, 398 Color property, 157, 162, 164, 219 ContractDescription class, 402 color subpanel, 95 control base classes ColorAnimation type, 135 creating user control, 207–217 colors, selecting, 95 UserControl class, 207 COM development, 388 Control class, 41, 371–373 combining special effects, 191–203 control properties, 156 combo box template, 110 control templates, 44–45, 228, 372 command class object, 50 Controller.xaml.cs file, 284 432 15_041802 bindex.qxp 4/2/07 5:24 PM Page 433
CurrentUICulture property Index controls properties, 156 ActiveX controls, adding Rich Text Box text control, 99 example, 340–344 ScrollViewer control, 109 overview, 339 Simple controls, 109 in XAML, 344–345 Slider control, 217 adding Windows Forms controls StackPanel control, 7, 49, 109, 198 adding ActiveX Controls, 339–344 steps to build it in Visual Studio, 211 adding ActiveX Controls in XAML, 344–345 styles, 44–46 adding WindowsFormsHost in code, 337–339 System.Windows.Controls.Border control, 9 adding WPF controls to Windows Forms, 345–349 System.Windows.Controls.Button control, 7 adding your HwndHost in XAML, 339 System.Windows.Controls.Grid control, 9 affecting properties, 349–351 System.Windows.Controls.Label control, 7 AdornerLayer control, 9 System.Windows.Controls.Primitives.Resize button, 112–113 Grip control, 9 Button control, 14, 37, 366, 372 System.Windows.Controls.TextBox control, 7 button controls System.Windows.Documents.AdornerDecorator creating, 112–113 control, 9 styling, 112–113 templates, 44–45, 228, 372 Canvas container control, 123–124 TextBlock text control, 99, 199 commands, 47–51 TextBox control, 37, 388 Common Control Library, 2 types, 43 composition, 44 User Control Library, 340 content controls, 43, 109 visual tree, 46–47 control base classes Windows Forms, adding controls, 337–351 creating user control, 207–217 adding ActiveX Controls, 339–344 UserControl class, 207 adding ActiveX Controls in XAML, 344–345 Control class, 41, 371–373 adding HwndHost in XAML, 339 Create Keyframe control, 106 adding WindowsFormsHost in code, 337–339 creating adding WPF controls to Windows Forms, 345–349 control inheritance, 109–110 affecting properties, 349–351 editing, 110 workspace zoom control, 89 overview, 108–109 WPF Custom Control Library, 78–82 styling, 110 conversions, data, 221–222 custom Converter property, 221 control base classes, 207–217 ConvertToRadians method, 213 customizing with templates, 228–230 Copy XAML command, 21 data binding, 217–222 core operating system (OS), security overview, 205–206 Cryptography API: Next Generation (CNG), 302 styles, 222–227 Least-Privilege User Access (LUA), 301 Custom Control Library, 79 overview, 300–301 default controls, 206 sandboxing, 301–302 dependency property system, 43–44 virtualization, 301 Dock Panel control, Toolbox, 103 corner nodes, 94 FlowDocumentScrollViewer text control, 99 create bindings task, 15 gradient slider control, 96 Create Keyframe control, 106 Grid control, 14, 37 Create Test Certificate button, 325 headered content controls, 43 CreatePointFromAngle method, 213 headered items controls, 43, 110 CreateWindow function, 330 Hyperlink control, 258 CreateWorkflow method, 416 items controls, 43, 109 CreditCarad.xaml file, 280 Label text control, 99 CreditCardData class, 281 ListBox control, 180, 186, 218 Cryptography API: Next Generation (CNG), 302 lookless controls, 205, 371 .cs code-behind file, 137 nested controls, 40, 41 CSS (Cascading Style Sheets), 111 overview, 41–43 culture, 59 PasswordBox text control, 99 Current class member, 70 Presentation Framework control, 110 CurrentUICulture property, 59 433 15_041802 bindex.qxp 4/2/07 5:24 PM Page 434
Curves path
Curves path, 93 Dock element, 111 Custom Control class, 80 dock layout panel, 102 Custom Control Library, 79 Dock panel, 102–103 Dock Panel control, Toolbox, 103 Dock property, 199 D docking positions, 102 data binding DockPanel.Dock property, 199, 363 conversions, 221–222 document portability, 5 markup extensions, 217 DoSomething( ) method, 401 modes, 217–219 DoSomethingElse( ) method, 401 templates, 219–220 DoubleAnimation type, 135, 138 data triggers, 54–57 DoWork event, 397 DataBind method, 217 DPS (dependency property system), 43–44, 362 DataContext property, 218, 371 Drawing API DataSource property, 217 brushes, 149–153 DataTemplate element, 57 geometry, 145–146 Deactivated event, 33, 35 shapes, 146–149 Debug This Application with the Selected Permission Drawing object, 167 Set checkbox, Advanced tab, 321 DrawingBrush class, 149, 156, 167–169 DecimalToPercentageConverter resource, 221 DrawingContext object, 365 declarative attributes, 73 DrawingGroup class, 167 Declarative Demands area, 320 DrawingVisual class, 365 declarative models, 15–16 DrawPoint method, 151 declarative programming, XAML DropShadowBitmapEffect, 171 designer and developer collaboration, 18 Duplex message exchange pattern, 402 overview, 4 DWM (Desktop Window Manager), 360–361 XAML runtime support, 17–18 dynamic declarative model, 17 default controls, 206 dynamic layout, 17 Delegate class, 393 dynamic styling, 17 dependency properties, 12, 363 DynamicFill.xaml file, 150 dependency property system (DPS), 43–44, 362 dynamic-link library (DLL), 26, 78 DependencyObject class, 13, 362–363 .deploy extension, 296 deployment E building applications, 292–293 ease-in value interpolation, 106 .NET Framework 3.0 runtime, 296–298 ease-out value interpolation, 106 overview, 61 Edit Style, context menu, 111 project in Expression Blend, 91 EditCommands class, 47 simplified, 4–5 editing standalone windows applications, 294–295 code with Visual Studio 2005, 117–118 XAML browser applications, 295–296 shapes, 92–93 design environment, 86 styles, custom controls, 222–227 designer interface, 73 templates, 110 desktop composition, 360 effects Desktop Window Manager (DWM), 360–361 bitmap effects, 171–175 DestroyWindowCore method, 332, 333 brushes detecting hit tests DrawingBrush, 167–169 with geometry, 130–134 GradientBrush, 162–165 to a point, 128–130 ImageBrush, 165–167 Direct3D, 4, 15 SolidColorBrush, 156–162 DirectX, 64, 330 VisualBrush, 169–171 Dispatcher class, 353, 362, 389, 390–391 combining, 191–203 DispatcherObject class, 362, 388, 389–390 overview, 155–156 DispatcherPriority enumeration, 390 transformations DisplayProduct activity, 420 opacity masks, 188–190 DLL (dynamic-link library), 26, 78 overview, 175–177
434 15_041802 bindex.qxp 4/2/07 5:24 PM Page 435
event routing Index RotateTransform, 186–188 TextBlock element, 366, 377 ScaleTransform, 180–183 TextBox element, 367, 369 SkewTransform, 183–186 ToolbarOverflowPanel element, 103 TranslateTransform, 178–180 UI element, 119 Electric Rain ZAM 3D, 21–22 UniformGrid element, 103 element system, 5–9, 10 UserControl element, 221 element trees, 6–9 Viewbox element, 103 ElementHost class, 345, 349, 350 ViewPort3D element, 21 elements visual elements, 85, 109, 116