WPF Under The Hood Engines Tamir Khason Software consulter mPrest systems [email_address] http://blogs.microsoft.co.il/blogs/tamir
Agenda What is Windows Presentation Foundation? New age of real world applications WPF properties system WPF data binding WPF visualization engine Expression Blend / Sparkle
What is Windows Presentation Foundation? It’s part of WinFX (.NET 3.0) It’s XAML (just like [HT]ML) and .NET 2.0 It’s a unified approach to code, UI, documents and media It’s not HWND It runs in Windows (XP too), Web and even /E It works mostly using the GPU
So XAML or Code Compile and Run Compile and Run Parse 010010100101101001010101101010100 BAML Load and Display < Button   Width =&quot;100&quot;  Background =&quot;LightBlue&quot;>OK</ Button > Button b =  new  Button(); b.Width = 100; b.Background = Brushes.LightBlue; b.Content =  &quot;OK&quot;; Dim b As New Button b.Width = 100 b.Background = Brushes.LightBlue b.Content =  &quot;OK&quot;
…  or Both CLASS Compile and Run public partial class  internal Button b; Load(“app.baml”); 010010100101101001010101101010100 app.baml Parse and Generate < Button   Width =&quot;100&quot;  Background =&quot;LightBlue&quot;  Click =&quot;DoSomething&quot;>OK</ Button > void DoSomething(object sender,  RoutedEventArgs e)  { MessageBox.Show( &quot;I do not have to do designer's work!&quot;);  }
WPF architecture Property Engine Input / Eventing System .NET Framework 2.0 Desktop Windows Manager Media Integration Layer DirectX Windows Vista Display Driver (LDDM) Windows Media Foundation Composition Engine Print Spooler Managed Unmanaged Application Services Deployment Services Databinding USER INTERFACE SERVICES XAML Accessibility Property System Input & Eventing BASE SERVICES DOCUMENT SERVICES Packaging Services XPS Documents Animation 2D 3D Audio Imaging Text Video Effects Composition Engine MEDIA INTEGRATION LAYER Controls Layout Windows Presentation Foundation XPS Viewer
New age of real world applications
LET’S DO IT! New age of real world applications
Dependency and Attached Properties Dependency Property Globally registered static property Handles storage and  property changes Implement a dependency properties when visual or logical inheritance, or invalidation is required Attached Property Specialized form of dependency properties Child elements store unique values on  parent Child informs parent how to present it on the UI If parent not found, attached property is ignored Property Engine Input / Eventing System .NET Framework 2.0 Unmanaged USER INTERFACE SERVICES Property System Input & Eventing BASE SERVICES DOCUMENT SERVICES MEDIA INTEGRATION LAYER
DEPENDENCY AND ATTACHED PROPERTIES WPF Properties Systems – base concepts
 
 
Data Binding UI can be bound to any data driven object Dependency properties can be even bounded to ADO.NET and Web Services All operations (filter, sort, group) are generated on top of the data You can apply Data Templates to the data What can be a data binding target Any  FrameworkElement Any  DependencyProperty Binding Target Binding Source Dependency Object Object Dependency Property Property TwoWay OneWay OneWayToSource
DATA BINDING WPF Data Binding
 
Visualization engine and Styling Dependency Properties = binding, styling, triggers, animation Template  = customized experience Removed explicit relationship between code & UI Empowered application designer to create custom visuals USER INTERFACE SERVICES XAML BASE SERVICES DOCUMENT SERVICES Composition Engine MEDIA INTEGRATION LAYER Controls Layout
STYLES, TEMPLATES, SKINS AND THEMES WPF visualization engine
 
 
 
LET DESIGNERS DO THEIR WORK Expression Blend / Sparkle
 
Come to meet me at the Development Panel, mail me [email_address] or visit my blog:  http://blogs.microsoft.co.il/blogs/tamir
2  iMATE JASJAM  –  סלולרי חכם משולב כף יד דור  3.5  בחסות חברת סולגוד יוגרלו בין כל ממלאי המשובים ! סט מקלדת - עכבר אלחוטיים יוגרלו בכל אולם בהרצאה האחרונה !  ( לא לשכוח למלא משוב מסכם ....)
Thanks giving Many thanks to Cian Walsh from Afterglow Design ( www.afterglow.ie ) for icons Thanks to PYImage for application layout Thanks to Big Bill for his song “How you want it done” Thanks to Microsoft for their Foundations ( www.netfx3.com )  Thank you for your patience! Go build your own application easily with WPF
 

Wpf Under The Hood Engines

  • 1.
    WPF Under TheHood Engines Tamir Khason Software consulter mPrest systems [email_address] http://blogs.microsoft.co.il/blogs/tamir
  • 2.
    Agenda What isWindows Presentation Foundation? New age of real world applications WPF properties system WPF data binding WPF visualization engine Expression Blend / Sparkle
  • 3.
    What is WindowsPresentation Foundation? It’s part of WinFX (.NET 3.0) It’s XAML (just like [HT]ML) and .NET 2.0 It’s a unified approach to code, UI, documents and media It’s not HWND It runs in Windows (XP too), Web and even /E It works mostly using the GPU
  • 4.
    So XAML orCode Compile and Run Compile and Run Parse 010010100101101001010101101010100 BAML Load and Display < Button Width =&quot;100&quot; Background =&quot;LightBlue&quot;>OK</ Button > Button b = new Button(); b.Width = 100; b.Background = Brushes.LightBlue; b.Content = &quot;OK&quot;; Dim b As New Button b.Width = 100 b.Background = Brushes.LightBlue b.Content = &quot;OK&quot;
  • 5.
    … orBoth CLASS Compile and Run public partial class internal Button b; Load(“app.baml”); 010010100101101001010101101010100 app.baml Parse and Generate < Button Width =&quot;100&quot; Background =&quot;LightBlue&quot; Click =&quot;DoSomething&quot;>OK</ Button > void DoSomething(object sender, RoutedEventArgs e) { MessageBox.Show( &quot;I do not have to do designer's work!&quot;); }
  • 6.
    WPF architecture PropertyEngine Input / Eventing System .NET Framework 2.0 Desktop Windows Manager Media Integration Layer DirectX Windows Vista Display Driver (LDDM) Windows Media Foundation Composition Engine Print Spooler Managed Unmanaged Application Services Deployment Services Databinding USER INTERFACE SERVICES XAML Accessibility Property System Input & Eventing BASE SERVICES DOCUMENT SERVICES Packaging Services XPS Documents Animation 2D 3D Audio Imaging Text Video Effects Composition Engine MEDIA INTEGRATION LAYER Controls Layout Windows Presentation Foundation XPS Viewer
  • 7.
    New age ofreal world applications
  • 8.
    LET’S DO IT!New age of real world applications
  • 9.
    Dependency and AttachedProperties Dependency Property Globally registered static property Handles storage and property changes Implement a dependency properties when visual or logical inheritance, or invalidation is required Attached Property Specialized form of dependency properties Child elements store unique values on parent Child informs parent how to present it on the UI If parent not found, attached property is ignored Property Engine Input / Eventing System .NET Framework 2.0 Unmanaged USER INTERFACE SERVICES Property System Input & Eventing BASE SERVICES DOCUMENT SERVICES MEDIA INTEGRATION LAYER
  • 10.
    DEPENDENCY AND ATTACHEDPROPERTIES WPF Properties Systems – base concepts
  • 11.
  • 12.
  • 13.
    Data Binding UIcan be bound to any data driven object Dependency properties can be even bounded to ADO.NET and Web Services All operations (filter, sort, group) are generated on top of the data You can apply Data Templates to the data What can be a data binding target Any FrameworkElement Any DependencyProperty Binding Target Binding Source Dependency Object Object Dependency Property Property TwoWay OneWay OneWayToSource
  • 14.
    DATA BINDING WPFData Binding
  • 15.
  • 16.
    Visualization engine andStyling Dependency Properties = binding, styling, triggers, animation Template = customized experience Removed explicit relationship between code & UI Empowered application designer to create custom visuals USER INTERFACE SERVICES XAML BASE SERVICES DOCUMENT SERVICES Composition Engine MEDIA INTEGRATION LAYER Controls Layout
  • 17.
    STYLES, TEMPLATES, SKINSAND THEMES WPF visualization engine
  • 18.
  • 19.
  • 20.
  • 21.
    LET DESIGNERS DOTHEIR WORK Expression Blend / Sparkle
  • 22.
  • 23.
    Come to meetme at the Development Panel, mail me [email_address] or visit my blog: http://blogs.microsoft.co.il/blogs/tamir
  • 24.
    2 iMATEJASJAM – סלולרי חכם משולב כף יד דור 3.5 בחסות חברת סולגוד יוגרלו בין כל ממלאי המשובים ! סט מקלדת - עכבר אלחוטיים יוגרלו בכל אולם בהרצאה האחרונה ! ( לא לשכוח למלא משוב מסכם ....)
  • 25.
    Thanks giving Manythanks to Cian Walsh from Afterglow Design ( www.afterglow.ie ) for icons Thanks to PYImage for application layout Thanks to Big Bill for his song “How you want it done” Thanks to Microsoft for their Foundations ( www.netfx3.com ) Thank you for your patience! Go build your own application easily with WPF
  • 26.