More Related Content Similar to WPF Fundamentals (20) More from Our Community Exchange LLC (10) WPF Fundamentals23. Dependency Properties Exposes Dependency Properties Consumes Dependency Properties Does not have to derive from DependencyObject Derives from DependencyObject DependencyObject CustomClassA CustomClassB 33. Direct Events :ListBox Bd:Border :ScrollViewer :Grid :Rectangle :ScrollContentPresenter :ItemsPresenter :VirtualizingStackPanel :ListBoxItem :ListBoxItem :ListBoxItem : AdornerLayer : ScrollBar : ScrollBar 35. Tunneling Events :ListBox Bd:Border :ScrollViewer :Grid :Rectangle :ScrollContentPresenter :ItemsPresenter :VirtualizingStackPanel :ListBoxItem :ListBoxItem :ListBoxItem :AdornerLayer :ScrollBar :ScrollBar 37. Bubbling Events :ListBox Bd:Border :ScrollViewer :Grid :Rectangle :ScrollContentPresenter :ItemsPresenter :VirtualizingStackPanel :ListBoxItem :ListBoxItem :ListBoxItem :AdornerLayer :ScrollBar :ScrollBar 39. RoutedEventArgs :ListBox Bd:Border :ScrollViewer :Grid :Rectangle :ScrollContentPresenter :ItemsPresenter :VirtualizingStackPanel :ListBoxItem :ListBoxItem :ListBoxItem :AdornerLayer :ScrollBar :ScrollBar 42. Raising and Handling Events :ListBox Bd:Border :ScrollViewer :Grid :Rectangle :ScrollContentPresenter :ItemsPresenter :VirtualizingStackPanel :ListBoxItem :ListBoxItem :ListBoxItem :AdornerLayer :ScrollBar :ScrollBar Event Handler 43. Attached Event Example <StackPanel Button.Click="CommonClickHandler" > <Button Name="YesButton">Yes</Button> <Button Name="NoButton" >No</Button> <Button Name="CancelButton">Cancel</Button> </StackPanel> 63. Dispatcher Each thread that creates UI objects needs and has affinity with a Dispatcher object. The Dispatcher owns the thread, the message loop and is responsible for dispatching to the appropriate handlers. Dispatcher Owns The Thread Owns the Message Loop Dispatches To Handlers Editor's Notes 06/10/09 15:24 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.