1. Trang chủ
  2. » Công Nghệ Thông Tin

853 silverlight 5 in action

1K 576 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 1.002
Dung lượng 37,13 MB

Nội dung

IN ACTION Revised Edition of Silverlight in Action Pete Brown MANNING www.it-ebooks.info Silverlight in Action PETE BROWN MANNING SHELTER ISLAND www.it-ebooks.info For online information and ordering of this and other Manning books, please visit www.manning.com The publisher offers discounts on this book when ordered in quantity For more information, please contact Special Sales Department Manning Publications Co 20 Baldwin Road PO Box 261 Shelter Island, NY 11964 Email: orders@manning.com ©2012 by Manning Publications Co All rights reserved No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without elemental chlorine Manning Publications Co 20 Baldwin Road PO Box 261 Shelter Island, NY 11964 Development editor: Technical proofreader: Copyeditor: Proofreader: Typesetter: Cover designer: ISBN: 9781617290312 Printed in the United States of America 10 – MAL – 18 17 16 15 14 13 12 www.it-ebooks.info Jeff Bleiel Thomas MacKearney Liz Welch Elizabeth Martin Marija Tudor Marija Tudor brief contents PART PART CORE SILVERLIGHT 1 ■ Introducing Silverlight ■ XAML and the property system ■ The application model and the plug-in ■ Working with HTML and browsers ■ Out-of-browser applications ■ The security model and elevated trust 114 26 47 73 95 CREATING THE USER INTERFACE 125 ■ Rendering, layout, and transforming ■ Panels 160 ■ Human input 180 10 ■ Text fundamentals 11 ■ Editing plain and rich text 225 12 ■ Control basics and UserControls 13 ■ Animation and behaviors 199 iii www.it-ebooks.info 272 247 127 iv PART PART PART PART BRIEF CONTENTS 14 ■ Resources, styles, and control templates 307 15 ■ Extensions, converters, custom controls, and panels 337 WORKING WITH DATA AND SERVICES 365 16 ■ Binding 367 17 ■ Data controls: DataGrid and DataForm 18 ■ Input validation 433 19 ■ Networking basics 20 ■ Working with SOAP services 21 ■ RESTful services with the ASP.NET Web API 22 ■ Working with XML, JSON, RSS, and Atom 23 ■ Duplex, sockets, and local connections 410 460 491 520 549 575 2D AND 3D GRAPHICS 601 24 ■ Graphics and effects 603 25 ■ Working with images 630 26 ■ Introduction to 3D 27 ■ 3D lighting, texturing, and animation 649 679 MAKING THE MOST OF THE PLATFORM 709 28 ■ Pop-ups, windows, and full-screen applications 29 ■ Navigation 734 30 ■ Working with files and directories 31 ■ Printing 798 32 ■ COM, Native Extensions, and p-invoke 711 761 832 BEST PRACTICES 867 33 ■ Structuring and testing with the MVVM pattern 869 34 ■ Debugging your application 35 ■ The install experience and preloaders www.it-ebooks.info 913 929 contents preface xxi acknowledgments xxiv about this book xxvi about the cover illustration PART 1 xxxi CORE SILVERLIGHT Introducing Silverlight 1.1 A Silverlight primer Silverlight and the web Silverlight and WPF Types of Silverlight applications ■ 1.2 A brief history of Silverlight Features for business and client applications Media and graphics enhancements 10 User interaction 11 Text 11 ■ ■ 1.3 ■ Getting started with Silverlight development 12 Setting up your development environment 13 1.4 ■ Helpful sites Building your first Silverlight web application 14 Project setup 15 User interface 16 Calling Twitter search 18 Parsing the results and binding the ListBox 19 Making the ListBox contents more meaningful 23 ■ ■ ■ 1.5 Summary 25 v www.it-ebooks.info 13 vi CONTENTS XAML and the property system 26 2.1 XAML basics 27 Objects 28 Namespaces 29 Properties 32 Dependency properties 33 Attached properties 35 Events 36 Commands 38 ■ ■ ■ ■ 2.2 Object trees and namescope Object trees 39 2.3 2.4 2.5 39 Namescope 42 ■ XAML type converters 43 Loading XAML at runtime 44 Summary 46 The application model and the plug-in 47 3.1 The Silverlight application model 48 Application startup process 49 XAP 50 The application manifest file 51 The Silverlight application object 52 Application dependencies 55 Assembly caching 56 ■ ■ ■ ■ 3.2 Creating the Silverlight plug-in 58 Using the object tag 59 Using the Silverlight.js utility file Creating an instance of the Silverlight plug-in 61 60 ■ 3.3 Integrating the Silverlight plug-in 62 Relating the Silverlight application to the HTML DOM 62 Clarifying the initial experience 64 Handling plug-in events 68 Sending initialization parameters 70 ■ ■ 3.4 Summary 71 Working with HTML and browsers 73 4.1 4.2 Silverlight and the HTML DOM 74 Working with the web page from managed code 75 Navigating web page contents 76 Working with element properties 77 Handling CSS information 78 Accessing the query string 78 ■ ■ 4.3 Working with the hosting browser window 79 Prompting the user 79 Navigating the browser window 81 Discovering the browser properties 81 ■ 4.4 Bridging the scripting and managed code worlds Calling managed code from JavaScript 82 from managed code 85 www.it-ebooks.info ■ 82 Using JavaScript vii CONTENTS 4.5 Hosting HTML in Silverlight Hosting the WebBrowser control WebBrowserBrush 92 4.6 Summary 86 87 ■ Using the 94 Out-of-browser applications 95 5.1 Implementation specifics Process and hosting 5.2 5.3 97 ■ 97 Capabilities and restrictions 98 The end-user experience 98 Creating out-of-browser applications 100 The out-of-browser settings file 100 Controlling the experience 102 Customizing icons 105 Updating ■ ■ 5.4 5.5 ■ Alerting the user with notification toast Controlling the host window 107 105 106 Basic window properties 108 Changing window chrome 109 Minimizing, maximizing, restoring, and closing 110 Moving a window 111 Resizing 111 ■ ■ ■ 5.6 Summary ■ 112 The security model and elevated trust 114 6.1 6.2 6.3 Code classifications and the transparency model 115 User initiation and consent 117 Elevated trust 119 Creating elevated trust applications 120 Enabling in-browser elevated trust applications 122 Detecting elevated trust mode 124 ■ ■ 6.4 PART Summary 124 CREATING THE USER INTERFACE 125 Rendering, layout, and transforming 127 7.1 The UIElement and FrameworkElement Properties 7.2 128 ■ 128 Methods 134 The rendering process 135 Clock tick 137 Per-frame rendering callback Rasterization 138 ■ www.it-ebooks.info 137 viii CONTENTS 7.3 The layout system 144 Multipass layout—measuring and arranging 144 The LayoutInformation class 146 Performance considerations 147 ■ 7.4 Render transforms 148 RotateTransform 149 ScaleTransform 150 SkewTransform 150 TranslateTransform 151 TransformGroup 151 CompositeTransform 152 MatrixTransform 153 ■ ■ ■ 7.5 3D projection transforms PlaneProjection 155 7.6 Summary ■ 155 Matrix3dProjection 157 159 Panels 160 8.1 Canvas 161 Setting the offsets 162 8.2 8.3 The StackPanel 165 The WrapPanel 166 Vertical wrapping 8.4 Setting the stack order 163 ■ 167 ■ Horizontal wrapping 168 The Grid 169 Arranging Grid content 170 Positioning Grid content 172 Spanning cells 172 Sizing it up 173 Working with the grid programmatically 176 Customizing cell boundaries 177 ■ ■ ■ ■ 8.5 Summary 179 Human input 180 9.1 Capturing the keyboard 181 Understanding focus 181 Handling keyboard events Dealing with modifier keys 184 ■ 9.2 Mouse input 185 Mouse movement events 186 Using the mouse wheel 191 9.3 9.4 Mouse button events 188 ■ Using multitouch 193 Collecting ink drawings 194 Creating the InkPresenter 195 Styling the ink 197 9.5 182 Summary ■ 198 www.it-ebooks.info Collecting ink 195 ix CONTENTS 10 Text fundamentals 199 10.1 The text system 200 Subpixel text rendering 200 Text hinting 201 formatting 202 Text rendering 203 ■ ■ Text ■ 10.2 Displaying text 204 Font properties 204 Flow control properties 209 Spacing 212 ■ 208 ■ Text ■ 10.3 OpenType font support 215 Ligatures 216 Stylistic sets 217 Font capitals 219 Fractions and numbers 220 Variants, superscript, and subscript 221 ■ ■ ■ 10.4 10.5 11 Embedding fonts 223 Summary 224 Editing plain and rich text 11.1 225 Handling basic text input 226 Enabling multiline text support 227 selection 228 11.2 11.3 11.4 11.5 12 ■ 247 Control 248 ■ Tab navigation and control state 249 ContentControl 251 The ContentPresenter 252 12.3 242 Summary 245 Appearance 248 Templating 250 12.2 Working with selected Free-form text layout Control basics and UserControls 12.1 ■ Multicolumn and free-form linked text 241 Multicolumn text 241 11.7 Mastering text Understanding input method editors 228 Copying text with the Clipboard API 231 Collecting sensitive data 232 Entering and displaying rich text 233 Formatting and inline elements 233 text 237 11.6 ■ Button controls 253 The Button 254 The HyperlinkButton 255 The RadioButton 255 The CheckBox 257 ■ ■ www.it-ebooks.info 955 INDEX Internet Explorer and MouseWheel event 191 and Silverlight 58 colors 614 DHTML Object Model 75 in full screen 730 Silverlight and ActiveX model 48 understanding limits 97 Internet Explorer 481 interpolation 292 curves 296 discrete 296 linear 294 spline 294 types 293 InvalidateSurface 659 important for animation systems 663 InvalidOperationException 255 Inversion of Control pattern 883, 903 Invoke method 85 InvokeScript method 90 IsActive property 108 IsChecked property 256 IsDropDownOpen property 262 IsEnabled property 249 IsFullScreen property 732 IsItemsHost property 347 ISM 593 isolated storage 791–796 available free space 794 creating directories 793 deleting files and directories 793 increasing quota 794 listing files and directories 792 per domain quota 794 quota 98 reading files 796 sensitive data 796 writing files 795–796 isolated storage quota increase 118 IsolatedStorageException 793 IsolatedStorageFile class 791–792 IsolatedStorageFileStream 795–796 IsPressed property 253 IsReadOnly property 227, 236, 417 IsTabStop property 249 IsThreeState property 258 ISV 57 IsValid property 428 isWindowless 65 Italic element 234 Italic font style 207 Items property 259, 326, 383, 441 ItemsCollection 258 ItemsControl data binding 383 data templates 402 ItemsControl class 258–265, 324, 356 ItemSource property 22 ItemsPanel class 326 ItemsPanel property 259 ItemsPresenter class 325 ItemsSource property 259, 383, 402 ItemTemplate property 259, 402 report writer example 821 IValueConverter 396 J JavaScript calling managed code 82–85 creating a Silverlight control 61 custom splash screens 934 invoking 90 script tag 60 setting focus in Silverlight 181 JavaScript Object Notation See JSON JournalOwnership property 759 journals, controlling 759 joystick 844 JPG image format 631 jQuery vs Silverlight JSON 61, 314, 540, 558–566 converting 558 serialization 562 syntax 68 testing RESTful service 530 JsonObject class 558 JSP 58 K Key property 184 keyboard 181–185 input limitations 731 modifier keys 184–185 responding to events 183 Keyboard class 184 www.it-ebooks.info KeyDown event 182, 640 keyed elements, data binding 382 KeyEventArgs class properties 183 KeyEventArgs parameter 182 KeyFrame class 698 only holds data 699 KeyFrame, naming template 293 KeyFrameAnimation class 706 members 700 KeyframeAnimation class 698 keyframes 291–297 adding 700 animation 698–706 timing 296 types 293 KeySpline property 295 control points 295 curves for interpolation 296 keystrokes 181–185 modifier keys 184–185 KeyTime property 296 KeyUp event 182, 640 L LabelPosition property 424 lambda expressions 19, 716 in debugging 921 lambda syntax 895 Language property 567 LastName property 439 LastOperation property 592 LastUpdatedTime property 567 layout arrange pass 145 arrange step 351 calculation 174 customizing 350–354 in Silverlight 144 in WPF 144 layout system 144–148 measure pass 145 measure step 350 multipass 144, 146 orbital 346 performance 147 radial 346 sizing and positioning 148 slots 146 subpixel rendering 163 virtualization 147 with attached properties 35 956 layout dimensions vs onscreen dimensions 813 layout panels Canvas 161, 164 Grid 169–179 nesting 169 StackPanel 165–169 layout system 144–148 LayoutCompleted event 146 LayoutInformation class 146 LayoutRoot control rerooting 812 Left enumeration value 131 Left property 162 left text alignment 211 LeftProperty dependency property 134 libraries, referencing 30 ligatures 216 contextual 217 discretionary 217 historical 217 lighting the scene 681 vectors 680–687 Line class 604–605 comparison with LineGeometry 609 x and y coordinate pairs 605 linear interpolation 294 keyframe types 293 LinearColorKeyFrame class 293 LinearDoubleKeyFrame 293 LinearGradientBrush class 318, 614–616 animation 286 declared as a resource 308 LinearPointKeyFrame 293 LineBreak flow control element 208 LineGeometry class, comparison with Line 609 LineHeight property 213 LineSegment class 612 linked files, and crosscompilation 507 Links property 567, 570 links, adding to top menu 741 LINQ 471 and web services 872 LINQ to XML 14, 550 Atom document parsing 19 parsing with 20 retrieving data 551 INDEX Linux, checking OS platform 834 ListBox class 259, 261 control templates 326 defining items at design time 260 defining look and feel 260 selecting items 261 ListBox control binding 21 data binding 384 ListBoxItem class 260 Load method 44 load progress, monitoring 936 Loaded event 290 LoadEmployees method 901 local space See model space LocalMessageReceiver object 596 LocalMessageSender object 597 Location API 836 logical trees 40 lookless controls 250 looping animation 281–282 loose resources 314–315 referencing relatively 314 retrieving with absolute URI 315 loose XAML 63 Lucida font 205 M Mac and ClearType 202 checking OS platform 834 debugging on 920 no Silverlight mouse wheel support 191 See also Apple MainDrawingSurface_Draw stubbed out 659 MainViewModel class 552 MainWindow object 110 managed code and scripting 82 calling DOM 75–79 calling from JavaScript 82–85 Managed Extensibility Framework See MEF Mandelbrot fractals 636–638 manifest file See AppManifest.xaml manipulating images 633 www.it-ebooks.info MapUri method 749 Margin property 132 markup extensions 338 StaticResource 309–310 TemplateBinding 324 Marshal class 857, 862 matrices 695 conversion 696 Matrix class 696 methods and properties 697 Matrix3dProjection 157 MatrixTransform 153–155 MaxDropDownHeight property 262 maximizing window 729 MaxLength property 227 measure pass 145 step 350 MeasureOverride function 145 media bitmap images 631–647 spring animations 642 Media Stream Source API 10 MediaElement, VideoBrush 619 MEF 55, 903, 937 menus, adding items 754 merging resource dictionaries 310 Message property 596 MessageBox, debugging 918 MessageReceivedEventArgs class 596 microformats 573 microphone and webcam access 118 Microsoft Excel See Excel Microsoft Expression 643 Microsoft Office 784 Microsoft Public License See Ms-PL Microsoft.Expression.Interactions.dll assembly 897 minimizing window 729 Mode property 369, 371 mode, Visible 415 Model 880 model space 695 transparency 115 Model-View-Controller See MVC Model-View-ViewModel myths 881 what it isn’t 881 INDEX Model-View-ViewModel pattern 869 basics 878–887 commands 892–896 compared to code-behind 879 history 878 separation from UI 892–906 See also Model See also View See also ViewModel modes full-screen 118 pinned 118 modifier keys 184–185 ModifierKeys enumeration 184 motion animation 276 MotionFinished event 642 mouse location 186 scrolling 11 wheel 191–192 mouse events 185–192 collecting ink 195 custom click event 190 mouse wheel 191 MouseButtonEventArgs 188 MouseEnter event 186 MouseLeave event 186 MouseLeftButtonDown event 111, 188, 195 MouseLeftButtonUp event 188, 195 MouseMove event 186, 195 MouseOver visual state 330, 332, 334 MouseRightButtonDown event 188 MouseRightButtonUp event 188 moving elements programmatically 162 movingPosition parameter 238 Mozilla Firefox 75 Ms-PL 60 multicast ASM 593 ISM 593 sockets 593–595 SSM 594 multiline text support 227 multipage printing 816–830 prerequisites 816–820 multipass layout 144, 146 MultiScaleImage class 638–639 composing dzi files 643 viewport 641 zooming programmatically 640 MultiScaleTileSource class 639 multitouch 11, 193 MVC design pattern 26 MVVM design pattern 27, 534 MvvmApplication sample application 871–878 AddVacationBonusCommand command 895 and web services 872 base ViewModel class 883 busines logic 888, 890 button functionality 877 CallMethodAction behavior 897 code-behind solution 875 DataGrid code 875 Edit button 896 employee detail view 873 employee detail window 876, 901 employee list view 872, 875 EmployeeDataService class 890 EmployeeListViewModel class 884, 888, 891, 900 Employees property 885 EmployeeVacationBonusService class 889 EmployeeViewModel class 898 list page ViewModel 884 LoadEmployees method 887, 901 LoadingProgress overlay 873 OnNavigatedTo method 887, 905 pop-ups 877 SelectedEmployee property 885 SilverlightTest class 911 testing 906–912 updated list view 886 View-specific entities 898 ViewModel locator 904 ViewModelCommand class 893 my namespace 270 N Name property 82, 330, 430 namescope 42–43, 596 bug in Silverlight 43 NameScope property 596 namespaces declaring 31 in SML 21 www.it-ebooks.info 957 in XAML 29–32 multiple 29 standard XAML 30 synchronizing 505 System.Windows.Input 129 Native Extensions for Silverlight See NESL native window, creating 717–730 Navigate method 81, 87, 746, 749 Navigated event 748 NavigateToBookmark method 81 NavigateToString method 89 NavigateUri property 255 Navigating event 748, 752 navigating to other assemblies 753–755 navigation 81 back and forward 737 browser journals 735 browsers 735–737 cancelling 752 custom controls 756–759 fragments See hashtags 736 hashtags 736 history 735–737 navigation application 738 Navigation Application template 738–744 out-of-browser 755–759 Tab-key 249 to pages 744–755 Navigation Application template 738–744 NavigationCacheMode property 752 NavigationContext property 751 NavigationFailed event 748 NavigationService class 744, 746–748 events 748 functions 746 properties 747 NavigationStopped event 748 NESL 839–857 accelerometer 840–849 and AccelerometerJoystick class 842 architecture 839 Install and recompile 840 integrating with the Windows taskbar 849 requires COM automation servers 855 958 nesting layout panels 169 nesting objects 28 Netflix install page 931 Netscape 58 Netscape Plug-in API See NPAPI Netscape Server Application Programming Interface See NSAPI NetTcp protocol 512 NetworkAddressChanged event 489 NetworkCredential constructor 486 NetworkInformation namespace 489 networking client HTTP stack 483–489 stack networks calls, blocking 469 cross-domain access 476–481 operations, debugging 923–928 requests, spread across subdomains 482 NewItemTemplate property 426 NewValue property 269 None stretch option 644 Normal font style 207 normal planar triangles 139 normal vectors 680–687 Normal visual state 330, 334 normals See normal vectors notification toast 106 NotificationWindow class 106 NotificationWindowClose method 107 NPAPI 191 NSAPI 58, 191 NuGet 471, 524 null values 399 nVidia 657 O OBJECT tag 63 object trees 29, 39–42 visual trees 40 objects application object 52–55 data binding 376–378 in XAML 28–29 nesting 28 Settings 143 Observable class 375, 884 INDEX Offset property and Color property 615 where color begins 615 offsets 162 OldValue property 269 OLE Automation 835 OnApplyTemplate method 358 onError 53, 68 event 69 OneTime binding mode 371 OneWay binding mode 372 OnFragmentNavigation event 745 onLoad 68 OnNavigatedFrom event 745 OnNavigatedTo event 745 OnNavigatingFrom event 745 onscreen dimensions vs layout dimensions 813 onscreen information, printing 810–816 onSourceDownloadComplete event 936 onSourceDownloadProgressChanged event 936 Opacity property 129, 622 animation 274, 278 Open file mode value 796 OpenFileDialog class 762 properties 763 safe and secure design 766 OpenType and fractions 220 font support 215 options RenderAtScale 142 selecting from a list 258, 262 OrbitPanel IntelliSense 353 Orbits property 347 OrbitPanel example 345–355, 362 CalculateOrbitSpacing method 352 Children property 346 ControlsLib namespace 353 dependency properties 347 markup 352 MeasureOverride method 350 Orbit property 349 OrbitPanel class 346 possible enhancements 354 project setup 346 properties 347 SortElements method 350, 352 www.it-ebooks.info Order property 430 orientation ClearType 202 horizontal 165 vertical 165 Orientation property 165 OriginalSource property 186, 191 OS X 184 See also Mac Oscillations property 300 out parameter 513 out-of-browser application settings 100 capabilities 98 checking network state 489 comparison with in-browser 95 controlling user experience 102–105 creating applications 100 custom window chrome 109 customizing icons 105 elevated trust 120 end-user experience 98–100 forcing out-of-browser mode 102 host window 107 implementing 97 installation process 99 minimizing and maximizing windows 110 moving windows 111 navigating 755–759 notification toast 106 resizing windows 111 restoring and closing windows 110 restrictions 98 updating 105 Windows integration 98 OutlineColor property 197 OutOfBrowserSettings.xml 100 Icons section 105 Window element 109 overlapping content 163 OverlayBrush property 717 OverlayOpacity property 717 P p-invoke accessing system printer information 857 for API calls 857–865 writing code 860 packaged XAML 63 INDEX Padding property 132, 214, 249 Page class 740, 744–745 navigation-related functions 744 PageMargins property 804–805 pages caching 751 navigating to 744–755 new 740 numbers 827–830 page parameters 750 requesting 520 surfacing commands 894 PageVisual property 804, 806 Panel class 267, 327 animation 276 Children property 347 clipping 354 custom panels 345–355 possible enhancements 354 Panel See OrbitPanel example panels vs controls 355 Paragraph element 233 Parent property 77, 135 parentElement 63 pARGB 635 parts 331 and states model 335 Password property 232 PasswordBox element 232 PasswordChar property 232 passwords 232 Path attribute 478 Path class 604, 779 path geometries 611 PathFigure class 611 PathGeometry class 611 segment types 612 PathSegment class 611 Pause method 287, 619 per-frame rendering callback 137 performance hit 65 Person class 454 PHP 58 pixel processing, combines texture and geometry 652 pixel shaders 624–629, 680 custom effects 628 model 624 pixel shader class 626 profile 624 setting up environment 625 using 628 WPF Pixel Shader Effects library 625 pixels 206 PixelShader class 627 PlaneProjection 155, 157 Platform Invoke See p-invoke Platform property 82 PlatformKeyCode property 184 plug-in See browser plug-in PNG image format 631 support in Silverlight 11 Point class 607, 616, 642 PointAnimation class 276 points 206 Points property 608 policy element 477 policy file, serving 590 polling 576 PolyBezierSegment class 612 Polygon draws closed shape 608 Points property 608 versus Polyline 608 Polygon class 133, 604 See also Polygon Polyline coordinate pairs 607 draws open shape 607 PointCollection 607 versus Polygon 608 Polyline class 604 Polyline class See Polyline PolyLineSegment class 612 PolyQuadraticBezierSegment class 612 pop-up windows 11 pop-ups 712–717 MvvmApplication sample application 877 Popup class 713 Port attribute 478 portable network graphics See PNG position absolute 605 offsets 162 relative 605 Position property 194 POST 520, 544 POSTing to a RESTful service 544 PostScript advantages 800 converting to 807 power of 688 PowerEase class 299 www.it-ebooks.info 959 POX 540 See also XML PreferredMultiSampleCount property 659 preloaders 933–937 default 933 defining the appearance of 934–935 JavaScript 934 monitoring load progress 936 PreparingCellForEdit event 417 Press click mode 254 Pressed visual state 330 primitives 671–678 rendering the sphere 676 TriangleList 672 TriangleStrip 673 Print method 800–801 PrintableArea property 804–805 PrintDocument class 800–804 PrintedPageCount property 801, 803 PRINTER_INFO_2 class 863 printer, setting up application 857 PrinterFallbackSettings class 809 PrinterInformation class 863 PrinterService class 860 printing 799–810 and page margins 804 and trust 802 at different size 813 bitmap-based 808 clipping 815, 825 dpi 805 forcing vector 809 header and footer 827–830 how it works 799–810 in Silverlight large documents 808 letting user cancel 806 line items 820–825 onscreen information 810–816 page breaks 825 page numbers 827–830 rasterization 807 resolution See dpi scaling to fit 814–815 tracking page size 825 two modes 799 visual tree 820–825 printing line items, example 820 960 printing onscreen information 810–816 as is 810 rerooting 812 PrintPage event 800–801, 804–806 report writer example 828 PrintPageEventArgs class 804 processing pixel 652 progress property 937 project structure 659–667 camera 665 renderable scene objects 663 scene 660 project templates, installing 653 projection space 695 transforms 155–159 Projection matrix 696 Prompt method 80 Prompt property 430 property 255 Property attribute 319 property path 36 syntax 287 Property property 269 PropertyChanged event 375 PropertyChangedCallback class 269 PropertyChangedCallback property 268 PropertyChangedEventArgs 376 PropertyMetadata class 268, 348 Protocol attribute 478 PublishDate property 570 Q QuadraticBezierSegment class 612 QuadraticEase class 299 QuarticEase class 299 query string 750 accessing 78 QueryString property 751 QuinticEase class 299 Quota property 794 R RadialGradientBrush class 616 RadioButton class 255, 257 grouping 256 RadiusX property 617 Rectangle 606 INDEX RadiusY property 617 Rectangle 606 RangeAttribute class 452 RangeBase class 356 raster 603, 618, 807 rasterization 138, 144, 807 raytracing 140 Reactive Extensions See Rx ReadObject method 562 ReadOnlyTemplate property 426 ReceiverName property 596 receivers, creating 596 receiving data 495 Rectangle bulging 606 Height property 606 rounded 606 Width property 606 Rectangle class 604 animation 284 comparison with RectangleGeometry 610 Rectangle class See Rectangle RectangleGeometry class 610 comparison with Rectangle 610 redirecting the browser 81 redraw regions 143 referencing events 37 inline properties 32 libraries 30 Silverlight.js utility file 60 Refresh method 746 regions, for hit testing 609 Register method 268, 347 RegisterAttached method 349 registers 626 RegisterScriptableObject method 83 RegularExpressionAttribute class 452 relative position 605 sizing 64 source binding 379 URIs 315–316 Release click mode 254 Remove method 314 RemoveAt method 176 removing resources using DELETE 546 render transforms 148–155 RenderAtScale option 142 www.it-ebooks.info rendering 135–144 cached composition 140–142 content 163 order 139 subpixel rendering 163 user Silverlight control 64–68 Rendering event 93, 138 rendering pipeline 652 rendering process 135–144 cached composition 140–142 clock tick 137 occlusion 139 order 139 per-frame rendering callback 137 rasterization 138–144 steps 136 RenderingEventArgs class 138 RenderingTime property 138 RenderMode property 656 RenderModeChanged event 656 RenderModeReason property 656 reparent See rerooting RepeatBehavior property 281–282 takes precedence over Duration 281 replacing selected text 240 Repository pattern 526 Representational State Transfer See REST request/response pattern 461, 474 simplifying 465 requesting a page 520 RequiredAttribute class 452 rerooting 812 ResourceDictionary 309 Resources attribute 314 property 289, 309, 313 resources animation 289 bundled 315–317 declarative 308–314 dictionaries 310 element 478 loose 314–315 referencing 310, 313–314 removing using DELETE 546 retrieving with absolute URI 315 scoping 310 updating by POSTing 544 INDEX ResourceType property 430 Response property 596 REST any service that isn’t SOAP 520 consuming services 539 GETting from 540 helper libraries 548 Rest# 548 RESTful service adding the Silverlight project 531 creating controller 528 creating using ASP.NET Web API 522–539 decides format of data 541 POSTing data to 544 shared model project 525 testing using a browser 530 Resume method 287 reusable components 308 controls 265 templates 328 RGB 614 aRGB format 614 RxGyBz format 614 RIA Rich Internet Application See RIA rich text 233–245 retrieving as XAML 240 RichTextBox control 12 element 233–245 Right enumeration value 131 right text alignment 211 right-clicking 11 right-hand coordinate system 696 RootVisual 53 RotateTransform 148–149 rotating objects 149 rotation 703 CreateFromYawPitchRoll 704 routed events 37 RoutedEvent property 290 Row property 172 RowDefinitions property 170 RowDetailsTemplate property 414 RowDetailsVisibilityMode property 414 rows and columns adding programmatically 176 removing programmatically 176 RowSpan attached property 172 RSS 566–573 Run flow control element 208 runtime binding 369 loading XAML 44–46 parsing XAML 44 RuntimeVersion attribute 51 Rx 471 S Safari 58, 75, 97 Webkit-based 86 safeguards full-screen mode restriction 731 limits to user input 731 SaveFileDialog class 767–770 and Save As 769 properties and methods 767 SaveToString method 92 ScaleTransform class 148, 150 instead of animation 276 ScaleX property 150 ScaleY property 150 scaling, rotating, translating See SRT scene lighting 681 manages information for 3D 660 renderable objects 663 Scene class 654 AmbientLightColor property 681 loading triangle and its shader 670 main class in 3D system 661 SceneObject instances 663 SetupLights method 681 SceneObject class 664 screen mode normal full-screen mode 731–732 resizing content 732 toggling 732 screenshots 634 ScriptableMember attribute 83 ScriptableType attribute 83 ScriptAlias property 83 scripting and managed code 82 SDK DirectX 625 Expression Blend 897 www.it-ebooks.info 961 SDKStyles.xaml file 742 security and reflection 117 attack 731 safe browsing 791 Seek method 287 segments Arc 612 Bézier 612 Line 612 PolyBezier 612 PolyLine 612 PolyQuadraticBezier 612 QuadraticBezier 612 Select function 238 selected text 237–245 formatting 239 SelectedIndex property 261 SelectedItems property 261 SelectedText property 228 selecting from a list 258, 262 text 228 Selection property 238 SelectionLength property 228 SelectionStart property 228 Selector class 261, 356 sender, creating 597 SenderDomain property 596 sending data 499 Sensor class 844 SensorManager class 844 service calls, factoring 890–892 service proxy 497 service references 495 ServiceError class 516 ServiceReferences.ClientConfig file 511 SetBinding method 370 SetLeft method 162 SetProperty method 77 SetPropertyValue method 389 SetStyleAttribute method 78 Setter class 319 Settings object 143 SetTop method 163 SetValue method 135, 348 Shader Model specification 624 Shader Model 2.0 652 shaders CustomEffect.slfx 653 See also Shader Model simple vertex color 667 vertex 670, 680 962 ShadowDepth property 622 Shape class 604–608 exposes Stretch property 644 shapes circular 606 closed 608 five-pointed star 609 geometric 609 open 608 shared model project 525 SharePoint 487, 566 sharing type definitions 505 visual states 335 Shazzam 625 shearing transform 150 ShortName property 430 Show method 107, 715 ShowGridLines property 171 showing dialog boxes 712–717 pop-ups 712–717 signing applications 121 SilverChat 595 Silverlight accessing the browser window 79 Ajax and ActiveX 58 and H.264 10 and printing and proxies for RESTful services 540 and SOAP services 492 animation 273–302 application 58 application defined 48 application model 48 asynchronous communication restriction 469 BiDi text 12 bitmap API 10 business features ClearType fonts 11 code transparent by default 116 code-behind 870–878 collect handwritten information 194 commands 892–896 communication APIs 489 configuration dialog 67 connecting to Twitter 14–24 connecting to web services 495 INDEX creating a dedicated RSS reader 573 creating an application 16 customizing install experience 931–933 defined development 12–14 dialog boxes 11 differences from WPF 40 DRM 10 entry point 50 every page a UserControl 266 excels at media font support 205 fonts 11 Group Policy settings 123 hosting 16 hosting server 63 improvement over HTML 258, 261 initializing 70 installation 58 integration with a web page 65 JavaScript latest plug-in version 932 layout 144 making it talk 835 media enhancements 10 Media Stream Source API 10 microphones 10 mouse scrolling 11 multitouch support 11 networking APIs 489 networking stack new features 12 occlusion culling at the brush pixel level 140 performance 65 plug-in not installed 930–933 PNG support 11 pop-up windows 11 printing from 799–830 printing in raster mode 805 printing limitations 816 quitting application 53 RichTextBox control 12 right-click support 11 SDK 13, 152, 411 security levels 115 security model 118 security safeguards 731 SOAP 1.1 protocol support 492 startup events 68–70 www.it-ebooks.info supported DOM variants 75 supporting platforms 184 supports Shader Model 652 supports XNA “Reach” profile 652 testing 906–912 text 200 TextBlock and CSS equivalent 204 the HTML DOM 62–64 the web transformation matrix 153 types of applications UIs 16 upgrading 932 use of cookies 482 user initiation and consent 117 user interaction 11 validation versus HTML 5 versus jQuery visual prompts 713 WCF RIA Services webcams 10 within Internet Explorer 58 workflow 370 WPF Silverlight 1.0, migrating to Silverlight 2.0 71 Silverlight 2, validation 434 Silverlight 3, new features 12 Silverlight 4, new features 12 Silverlight application bundled resources 315 content files 316 declarative resources 309 embedded files 317 loose resources 314–315 site of origin 314 storing data on the local filesystem 791–796 Silverlight control 58, 74 creating from JavaScript 61 height 64 integrating with a web property 62 keyboard input 181 width 64 Silverlight Object Model 135 Silverlight plug-in 58 creating from JavaScript 61 default install badge 930 input focus 181 installing 930–933 INDEX Silverlight plug-in (continued) integrating with a web property 62 latest version 932 Netflix install page 931 not installed 930–933 security 791 setting focus via JavaScript 181 upgrading 932 Silverlight Unit Testing Framework 906–910 installing 906 Silverlight.js file 932 Silverlight.js utility file 60 functions 60 referencing 60 Silverlight.net website 60 Silverlight/XAML 663 Silverlight/XNA 3D API 652–654 SilverlightFaultBehavior class 516 SilverlightHost class 55, 84, 732 simple geometries 609–611 simple properties 319 Simple Sandboxing API 115 SimpleTriangle class 668, 670 SineEase class 299 Single Responsibility Principle 887 site of origin 314, 476 Size property 194 SizeChanged event 659 sizing user-controlled 177 sizing precedence order 175 SkewTransform 148, 150 sllauncher.exe 97 SOAP services 492–500 socket-resource element 478 SocketAsyncEventArgs class 592 sockets bidirectional 589 implementation restricted 589 multicast 593–595 opening a connection 591 response, handling 591 TCP 589–593 SocketType 591 SolidColorBrush 209 SolidColorBrush class 613 declared as a resource 309 sorting See DataGrid class SortMemberPath property 417 Source property 87, 315, 369, 639, 747 referencing an image 631 source URI 63 Source-Specific Multicast See SSM SourceFeed property 570 SourceName property 619 spaces, coordinate 695–698 Span element 234 spanning cells 172 special folders, accessing 778 SpecialFolder enumeration 779 Speech API 835 SpeedRatio property 280 impact on duration 280 sphere convert to triangles 674 rendering with primitives 676 texturing 688 Sphere class 673 drawing code 676 tessellation code 675 splash screens 933–937 defining the appearance of 934–935 integrating 936 monitoring load progress 936 splashScreenSource property 936 spline interpolation 294 keyframe types 293 SplineColorKeyFrame class 293 SplineDoubleKeyFrame 293 SplinePointKeyFrame class 293 spoofing 731 spring animation 642 Springiness property 300 SQL Server Express 940 SQL Server, installing AdventureWorks on 939 SSL 497 SSM 593 saves bandwidth 594 stack order 164 StackPanel class 327 element 165–169 layout of invisible elements 130 StandardColors.xaml file 311 star sizing 173 www.it-ebooks.info 963 start and stop angles 354 StartPoint property 615 startup events 68–70 process 49–50 Startup event 52, 937 StartupEventArgs 52 state-based effects 331 states 329 change between 333 manage change between 331 management and transition 329 visual 329–335 See also visual states StaticResource markup extension 309–310 Stop enumeration value 282 method 287, 619 StopLoading method 746 Storyboard class 274, 283–291, 308, 330 controlling 287–289 defined 283 defining as a resource 289 programmatic control 287 triggering in response 290 storyboard control 287–289 storyboarding 283–291 StreamReader 796 StreamResourceInfo class 317 StreamWriter object 795 Stretch enumeration value 132 Stretch property 643–647 Fill option 646 None option 644 Uniform option 645 UniformToFill option 647 stretching 643–647 Fill option 646 None option 644 Uniform option 645 UniformToFill option 647 string-indexed elements, data binding 382 StringLengthAttribute class 452 Stroke 195 Style class 317, 319–323 style setters, value precedence 34 styling 317–323 explicit 321 implicit 322 ink 197 964 styling (continued) reusable templates 328 state-based effects 331 states 329 templates 323–329 transitioning effects 332 visual states 329–335 stylistic sets 217 StylusDevice object 196 property 186, 191 StylusPoint 198 subnavigation, responding to 745 subpixel rendering 163 subsetting 223 Summary property 570 synchronous validation 441–446 syndication feed downloading and processing 568 reading 566 SyndicationFeed class 19, 566 Items collection 569 SyndicationItem class available properties 569 syntax, URIs 753 System.Collections namespace 417 System.ComponentModel namespace 375, 441, 446 System.ComponentModel.DataAnnotations assembly 451 namespace 451, 900 System.Device.Location namespace 836 System.Drawing namespace 614 System.Exception exception 452 System.IO.IsolatedStorage namespace 791 System.Net namespace 462 System.Net.Sockets namespace 593 System.PlatformID 834 System.Runtime.Serialization namespace 495 System.Runtime.Serialization.Json namespace 562 System.ServiceModel namespace 495 System.ServiceModel.Channels namespace 495 System.ServiceModel.Web assembly 562 INDEX System.Speech namespace 835 System.Threading.Tasks namespace 474 System.Windows namespace 329 System.Windows.Browser namespace 75, 81, 83 System.Windows.Controls namespace 177, 411, 744 System.Windows.Controls.Data assembly 411 System.Windows.Controls.dll 263 System.Windows.Controls.Navigation namespace 740 System.Windows.Documents namespace 208 System.Windows.Ink namespace 197 System.Windows.Input namespace 129, 180, 184, 198 System.Windows.Interactivity library 305 System.Windows.Interactivity.dll assembly 897 System.Windows.Interop namespace 833 System.Windows.Markup namespace 44 System.Windows.Media namespace 614 System.Windows.Media.Imaging namespace 632 System.Windows.Messaging 595 System.Windows.Resources namespace 317 T tab navigation 249 TabControl class 262 defining look and feel 264 TabIndex property 249 TabItem, visual tree 262 TabNavigation property 249 TabStripPlacement property 265 tabular format 170 TagName property 77 TargetName 255 TargetName property 274, 277, 284 TargetNullValue 399 TargetProperty property 274, 277, 284 www.it-ebooks.info TargetType property 321 Task class 474 Task Parallel Library See TPL taskbar progress bar states 850 See also Windows TCP sockets 589–593 Template property 250, 323 TemplateBinding markup extension 324 templated properties, value precedence 34 TemplatePart attribute 358 TemplatePartAttribute class 331 templates control 323 custom control default template 359 Navigation Application template 738–744 project 653 reusable 328 styling 323–329 visual states 361 TemplateVisualState attribute 361 TemplateVisualStateAttribute class 330 tessellating a sphere 674 testing 906–912 asynchronous operations 911 custom controls 362 definitions 906 report writer example 819 Silverlight Unit Testing Framework 906–910 ViewModel 910 text 200 alignment 211 ClearType 200 copying to clipboard 231 displaying 204–223 editing 226, 233 entering 233 flow control 208 font properties 204–208 formatting 202 free-form layout 242 handling 226–228 hinting 201, 204 inline styles 234 input method editors 228–230 inserting 240 Italic font style 207 layout 242 965 INDEX text (continued) multiline support 227 Normal font style 207 pixel size 206 point size 206 rendering 203 replacing 240 rich text 233–245 selected 237–245 selecting 228 spacing 212–223 subpixel rendering 200 text properties 209, 212 viewing 226 text hinting 201, 204 animation 202 Text property 226 TextAlignment property 211 TextArea element 227 TextBlock 161, 171 aligning text 211 flow control 208 text wrapping 209 TextBlock class 498 animation 276 using resource brushes 308 TextBlock element 204–224 font properties 204–208 line spacing 212 TextBox 171 data binding 369, 377 TextBox class styles 317 using in a UserControl 265 TextBox element 226–228 multiline support 227 wrapping text 227 TextChanged event 226 TextDecorations property 209 TextHintingMode property 201 TextInput event 229 TextInputStart event 229 TextTrimming property 210 texture applying 687–694 UV coordinates 689 TexturedPlane class 691 TexturedSphere class 682 texturing tasks for project 688 TextWrapping property 209, 227 themes 742 Thickness property 805 three-state checkbox 258 Timeline class 275, 282–284 TimeOfDay property 374 Times New Roman font 205 TimeSpan class 283, 296 TimeSpan structure 280 timestamps directory 772 Title property 567, 717 To property 276, 333 and animation type 279 toast 106 ToggleButton class 256, 258, 356 toolbar, customized 423 toolkits, necessity of 660 ToolkitStyles.xaml file 742 Top enumeration value 132 property 162 TopMost property 108 TopProperty dependency property 134 ToString method 384, 402 TouchDevice property 194 TouchFrameEventArgs class 193 TouchPoints class 193 TPL 9, 474 Transform element 148–155 transformations, multiple 151 TransformGroup 151 transitioning effects 332 transitions elliptical 616 multiple color 616 TranslateTransform 148, 151 transparency model 115, 129 transparent 65 trapezoid 608 Trebuchet font 205 triangle adding to the scene 670 building using vertices 668 triangle list, versus triangle strip 673 triangle strip, versus triangle list 673 TriangleList control winding order 685 primitive 672 TriangleStrip primitive 673 triggering event 290 Triggers property 290 triggers See behaviors TrueType fonts supported within Silverlight 205 trust 476–481 and printing 802 trust mode, elevated 115 www.it-ebooks.info Trusted Certificate Root 121 tweening See interpolation TweetDeck 99 Twitter connecting to 14–24 follow author 13 search API 18 TwitterService class 405 TwitterUser class 404 TwoWay binding mode 372 type definitions, sharing 505 TypeConverter class 343 types base types 355 type converters 342–345 U u-blox 836 UDP multicast sockets 593 UdpAnySourceMulticastClient class 593 UdpSingleSourceMulticast class 593 UIElement 161 class 267 common properties 128–134 keyboard events 183 mouse events 188 transforms 148 UIElement class 128 UIs design composition 29 elements, data binding 378–381 in Silverlight, complex 135 separation from 892–906 virtualization 412 Underline property 209 Unfocused visual state 330 UnhandledException event 53 Uniform stretch option 645 UniformToFill stretch option 647 UpdateSourceTrigger 386 uploading to server 762 UploadStringAsync method 467 UriMapper class 749 UriMappings property 749 URIs 255, 748–751 absolute 315 destination 541 mapping 749, 753 relative 315 syntax 753 966 URL for embedded files 317 user control calling the control 270 defining appearance 266 defining behavior 267 development 266 user data 791 user experience 64–68 controlling out-of-browser experience 102–105 out-of-browser 98–100 user initiation 117 user interaction 11 user Silverlight plug-in rendering 64–68 user-controlled sizing 177 user-initiated clipboard access 118 UserAgent property 82 UserControl data binding 377 keyboard events 183 UserControl class 265–271 customizing 355 UseSprings property 642 using statement 551, 569 cleaning up 526 UV coordinates 626, 689 V ValidateSalaryAndLevelAsync class 450 ValidatesOnDataErrors property 441, 445 ValidatesOnExceptions parameter 438 ValidatesOnExceptions property 441, 445 validation asynchronous 446–451 calling external functions 454–456 client service code 449 combining messages 439 comparison of approaches 457 cross-field 443–445 custom code 439 custom validators 456 data annotations 451–458 displaying errors 440 employee example 434–440, 442, 447–451, 453–457 exception-based 438–440 INDEX handling errors 438 IDataErrorInfo interface 442 in common function 443 in Silverlight 434 input synchronous 441–446 via attributes 452 WCF web service 448 with exceptions and IDataErrorInfo interface 445 ValidationAttribute class 452 ValidationContext class 455 ValidationException exception 452 ValidationResult class 454 Value attribute 319 value converters 395–399, 922 value precedence 34 Value property 293 values, Application.Current.InstallState 102 VCR control 422 Vector3, holds points of data 667 vectors graphics 603 lighting and normal 680–687 printing, forcing 809 verbs, GET 540 Verdana font 205 version 66 vertex shaders 680 vertex See vertices VertexColorEnabled property 681 VertexPositionColor class 669 vertical offset 162 VerticalAlignment property 131 VerticalContentAlignment property 249 vertices 667–671 adding triangle to a scene 670 building a triangle 668 color 669 creating a simple triangle 668 define a point in 3D space 671 indexed 684 VideoBrush class 619 View 880 and ViewModel relationship 884 definition 880 View-specific entities 898–902 View-to-ViewModel ratio 884 www.it-ebooks.info view frustum 695 View matrix 696 view space 695 View-Model-ViewModel pattern View-specific entities 898 View-specific entities and ViewModel 898–902 ViewModel 880 and View relationship 884 and View-specific entities 898–902 as interface 903 base class 883 compared to codebehind 887 data access 890–892 definition 880 implementation 882–887 list page 884 locators 903 naming 884 ownership 882 service calls 890–892 testing 910 View-to-ViewModel ratio 884 ViewModel class 392 ViewModel pattern See ModelView-ViewModel pattern viewport 638, 641–643 defined 641 managing 641 setting the size 641 ViewportOrigin property 642 ViewportWidth property 641 views, adding 740 virtual filesystem See filesystem virtual PC 490 virtualization 147 visibility modes All 416 Collapsed 415 Column 416 Row 416 VisibleWhenSelected 415 Visibility property 130 visual parts 331 tree 135 visual state groups CommonStates 330 FocusStates 330 visual states 329–335, 360 change between 333 Checked 330 Collapsed 360, 362 967 INDEX visual states (continued) Expanded 360, 362 in control template 361 MouseOver 332, 334 Normal 334 sharing 335 transition 330 Visual Studio 51, 523, 688, 836 adding breakpoints to code 916 build actions 316–317 creating service references 495 generates test certificate 121 keeping the web server port constant 463 NuGet package manager 471 Visual Studio 2010 15 downloading 13 signing a XAP 121 visual trees 40, 260 TabItem 262 traversing with VisualTreeHelper 41 VisualState class 332, 335 Control enters 331 VisualStateGroup class 332 VisualStateManager class 329–335, 360 effects 331 parts and states model 329 VisualStateTransition class 332 VisualTransition class 335 VisualTreeHelper class 41 W W3C 75 WCF duplex services 576–589 error handling 513 RIA Services vs ASP.NET for services 497 web service for validation 448 WCF service and complex data types 500–511 creating Silverlightenabled 501 WCF service implementation example 818 Web Platform Installer See WebPI web properties 74 integrating the Silverlight control 62 Web Service Description Language See WSDL web services and code-behind 871 and LINQ 872 MvvmApplication sample application 872 WebBrowser control 87–92 must have a size 94 WebBrowserBrush control 92 webcam and microphone access 118 webcams 10 WebClient class 55, 465, 541 properties and methods 467 simple event-based approach 542 WebKit 58, 97 WebPI 523 WebRequest class for networking 462 WebRequestCreator class 483 websites 10rem.net 13 Channel 13 helpful 13 Silverlight Cream 13 Silverlight TV 13 Whack-a-Mole 296 White Screen of Death See WSOD Width property 145, 173, 179, 318 Rectangle 606 Wilcox, Jeff 122 Win32 API interface 860–865 window closing, minimizing, and maximizing 729 creating native 717–730 customizing chrome 723 moving 725 required shape 728 resizing 725 setting state 720 Window class 108, 718 Content property 719 Window property 79 Windows taskbar 849 Windows Aero 723 Windows Communication Foundation See WCF Windows Forms colors 614 compared to XAML 27 www.it-ebooks.info Windows Logo key 184 Windows modifier key 185 Windows Presentation Foundation See WPF Windows Workflow Foundation See WF WindowState property 108 WindowState, possible values 720 WindowStyle, values 724 Wireshark 928 World matrix 696 world space 695 World Wide Web Consortium See W3C World-View-Projection matrix See WVP WPF 4, and FontStyle options 208 commands 892–896 data binding 370 differences from Silverlight 40 layout 144 supports pixel shaders 624 TextDecorations property 209 Visibility enumeration 131 WPF Pixel Shader Effects library 625 WrapPanel, in Silverlight toolkit 167 WriteableBitmap class 632, 634 creating Mandelbrot fractals 637 direct pixel access 635 WriteObject method 562 WSDL 493 creating service references 495 WSOD 59 WVP 696 X X property 151 x:Key attribute 309, 321 XAML alternate default namespace 30 and CLR objects 17 basics 27–39 binding breakpoints 922 CLR namespaces 30 colors 344 commands 38 compared to Windows Forms 27 968 XAML (continued) CompositionMode 659 constructor rules 28 data binding 369–371 declaring value converters 395 defining a Line 605 defining an Ellipse 606 dependency properties 33–35 event handlers 37 events 36–38 extensions 43 from rich text 240 inline 63 loading at runtime 44–46 loose 63 Name vs x:Name 29 namespaces 29–32 objects 28–29 overlay to obscure DrawingSurface 659 parsing at runtime 44 properties 32, 36 INDEX runtime parsing 44 setting DataContext 377 standard namespaces 30 Testing RESTful services 531 XAML breakpoints 922 XAML files, editing 27 XAML markup extensions 338–342 XamlParseException 310 XamlReader 342 XamlReader class 44 XAP 48, 50 decrease file size 51 sign 120 XDocument class, resolving 21 XML 550 XmlReader class, reading XML 566 XmlSerializer class 554 XmlSerializerNamespaces class 557 XmlWriterSettings class 556 www.it-ebooks.info XNA “Reach” profile 652 and BasicEffect 670 Color class 663 stock effects 680 XNA Game Studio 4.0 3D core libraries 652 XNA Studio 653 Y Y property 151 Z z-ordering 659 ZIndex property 164 zoom in or out 150 ZoomAboutLogicalPoint method 639 zooming 639–641 SILVERLIGHT/.NET Silverlight IN ACTION Pete Brown T his hands-on guide explores Silverlight from the ground up, covering every feature in rich, practical detail It is readable and the coverage is comprehensive You’ll master networking, MVVM, and more, with dozens of code samples you can use in Visual Studio or the free Visual Web Developer Express Silverlight in Action teaches you how to build desktop-quality applications you can deploy on the web Beginners will appreciate the progression from simple examples to full applications that employ good design and coding practices Seasoned NET developers will love how the sample code embraces and extends what they already know SEE INSERT As entertaining as it is “educational Pete covers Silverlight like no one else! ” —Joe Suchy, ATC Transportation The go-to source for “ real Silverlight answers and examples ” Hands down THE best “reference for everything Silverlight ” must-have book for every “ASilverlight developer ” —Dave Campbell, WynApse What’s Inside ● 2D and 3D graphics and animation Business application services, rules, and validation The MVVM pattern and testing ● free appendixes (200 pages) available online ● ● A background in C# or VB.NET is helpful, but no knowledge of Silverlight or XAML is required This book is a revised edition of Silverlight in Action Pete Brown leads Microsoft’s Silverlight/XAML Developer Community team He’s been a Silverlight MVP, an INETA speaker, and successful RIA Architect To download a free eBook plus additional content in PDF, ePub and Kindle formats, owners of this book should visit manning.com/Silverlight5inAction MANNING $59.99 / Can $62.99 [INCLUDING eBOOK] www.it-ebooks.info —Michael Crump, Telerik —Dave Davis BlueMetal Architects Inc ... Atom 54 9 22.1 Parsing plain old XML LINQ to XML 22.2 55 0 ■ 55 0 XmlSerializer 55 4 Working with JSON 55 8 JsonObject and JsonArray 22.3 55 9 ■ Working with RSS and Atom Reading syndication feeds 56 6... Understanding your binding source 373 Binding to a property 374 Binding to an object 376 Binding to a UI element 378 Binding to an indexed element 381 Binding to a keyed (string indexed) element 382 Binding... caching 56 ■ ■ ■ ■ 3.2 Creating the Silverlight plug -in 58 Using the object tag 59 Using the Silverlight. js utility file Creating an instance of the Silverlight plug -in 61 60 ■ 3.3 Integrating

Ngày đăng: 06/03/2019, 11:32

TỪ KHÓA LIÊN QUAN