SlideShare une entreprise Scribd logo
1  sur  107
Windows Presentation Foundation Using Visual Studio 2010 & Expression Blend 4 Adil Ahmed Mughal
About Me ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
About This Course ,[object Object],[object Object],[object Object],[object Object]
Course Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Module 1
Module 1: Creating an Application by Using Windows Presentation Foundation (WPF) ,[object Object],[object Object],[object Object]
Lesson: Overview of WPF ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Background ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Background ,[object Object],[object Object],[object Object],[object Object]
What Is WPF? ,[object Object],[object Object],[object Object],[object Object],.NET Framework 2.0 Windows Presentation Foundation (WPF) Windows Communication Foundation (WCF) Windows Workflow Foundation (WF) Windows CardSpace (WCS)
WPF Architecture WPF Core Components PresentationFramework Common Language Runtime PresentationCore milcore DirectX User32 Kernel Managed Code Unmanaged Code
Defining User Interfaces in WPF <Window ... > ... <Label>Label</Label> <TextBox>TextBox</TextBox> <RichTextBox ... /> <RadioButton>RadioButton</RadioButton> <CheckBox>CheckBox</CheckBox> <Button>Button</Button> </Window>
WPF Capabilities and Features WPF provides the following capabilities and features: ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
WPF Application Types Stand-Alone Applications XAML Browser Applications (XBAPs)
Lesson: Creating a Simple WPF Application ,[object Object],[object Object],[object Object],[object Object],[object Object]
Demonstration: Creating WPF Applications by Using Visual Studio 2008 ,[object Object],[object Object],[object Object]
Defining the Application <Application xmlns:x=… xmlns=…  x:Class=&quot;MyApp.App&quot; StartupUri=&quot;Window1.xaml&quot;> <Application.Resources> …  </Application.Resources> </Application> Visual Studio generates a XAML application file that specifies: ,[object Object],[object Object],[object Object]
Defining Windows or Pages A stand-alone application contains windows or pages ,[object Object],[object Object],<Window xmlns:x=… xmlns=…  x:Class=&quot;MyApp.Window1&quot; Title=&quot;My Window&quot;> <Grid> …   </Grid> </Window> <Page xmlns:x=… xmlns=…  x:Class=&quot;MyApp.Page1&quot; WindowTitle=&quot;My Page&quot;> <Grid> …   </Grid> </Page>
Adding Controls Windows and pages contain controls ,[object Object],[object Object],... <Grid> <TextBox Name=&quot;TextBox1&quot; /> <Button Name=&quot;Button1&quot;>Click here</Button> </Grid> ...
Building and Running a WPF Application You can build and run a WPF application in Visual Studio Stand-alone or browser application  Stand-Alone Application Browser Application
Lesson:  Handling Events and Commands ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The WPF Event Model WPF controls generate events such as: ,[object Object],[object Object],[object Object],[object Object]
Handling WPF Control Events Implement event handler method in the code-behind file Specify an event handler in the XAML file <Button Name=&quot;Button1&quot; Click=&quot;Button1_Click&quot;> Click here </Button> public void Button1_Click( object sender,  RoutedEventArgs  e) { MessageBox.Show(&quot;Hello WPF&quot;); }
What Are Routed Events? Root element Child element  #1 Child element #2 Leaf element  #1 Leaf  element #2 WPF can route events up or down the element tree Event bubbling: Event routed up element tree Event tunneling: Event routed down element tree Tunnel Tunnel Bubble Bubble Item clicked
Defining Routed Events Example of event bubbling ,[object Object],[object Object],<StackPanel Button.Click=&quot; CommonClickHandler &quot;>  <Button Name=&quot;YesButton&quot;>Yes</Button> <Button Name=&quot;NoButton&quot;>No</Button> </StackPanel> private void  CommonClickHandler (object sender, RoutedEventArgs e)  {  Button b = e.Source as Button;  ... }
What Are Commands? Commands separate the semantics of an action from its logic   ,[object Object],[object Object],Key concepts in WPF commanding: ,[object Object],[object Object],[object Object],[object Object],Examples of predefined commands: ,[object Object]
Demonstration: Defining Commands ,[object Object],[object Object],[object Object]
Module Review and Takeaways ,[object Object],[object Object],[object Object],[object Object],[object Object]
Module 2
Module 2: Building User Interfaces ,[object Object],[object Object],[object Object]
Lesson:  Defining Layout ,[object Object],[object Object],[object Object],[object Object]
WPF Page Layout Model ,[object Object],[object Object],Measurement Pass 1 Hello World! Evaluate each member of the  Children  collection to determine Its  DesiredSize Arrangement Pass 2 Window  or  Page  element Determine the final size of each child object and place within Its layout slot Layout class Child objects
WPF Layout Classes Canvas VirtualizingStackPanel DockPanel Grid StackPanel WrapPanel Panel Background Children ZIndex
Demonstration: Defining Layout by Using Panels ,[object Object],[object Object],[object Object],[object Object],[object Object]
Notes Page Over-flow Slide. Do Not Print Slide. See Notes pane.
Demonstration: Defining Layout by Using Grids In this demonstration, you will see how to use the Grid  class
Lesson: Building User Interfaces by  Using Content Controls ,[object Object],[object Object],[object Object],[object Object]
What Is a Content Control? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Examples Text DateTime UIElement Multiple objects Button This is text content of a Button 04/03/2007 13:06
Demonstration: Creating a User Interface by Using Content Controls ,[object Object],[object Object],[object Object]
Notes Page Over-flow Slide. Do Not Print Slide. See Notes pane.
What Is a Headered Content Control? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Example TabItem   header GroupBox Expander
Demonstration: Creating a User Interface by Using Headered Content Controls ,[object Object],[object Object],[object Object],[object Object]
Notes Page Over-flow Slide. Do Not Print Slide. See Notes pane.
Lesson: Building User Interfaces by  Using  Items Controls ,[object Object],[object Object],[object Object]
What Is an Items Control? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Can be different types ItemsSource Items
Handling Item Selection Attach event handler <ListBox SelectionChanged=&quot;ListBox1_SelectionChanged&quot;> ... </ListBox> Define event handler public void ListBox1_SelectionChanged( object sender, SelectionChangedEventArgs e) { ... }
Demonstration: Creating a User Interface by Using Items Controls In this demonstration, you will see how to use the  ListBox  class
Module Review and Takeaways ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Module 3
Module 3: Customizing Appearance  ,[object Object],[object Object],[object Object],[object Object]
Lesson:  Sharing Logical Resources in an Application ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What Are Resources? Resources provide a simple way to reuse commonly defined objects and values For example: brushes, styles, and control templates  XAML Code
Defining Resources You can define resources at various levels: ,[object Object],[object Object],[object Object],XAML <Window.Resources> <SolidColorBrush x:Key=&quot;blueBrush&quot; Color=&quot;Blue&quot;/> <SolidColorBrush x:Key=&quot;whiteBrush&quot; Color=&quot;White&quot;/> <sys:Double x:Key=&quot;myValue&quot;>100</sys:Double> </Window.Resources>
Referencing Resources in XAML To reference a resource statically: PropertyName=&quot; {StaticResource  ResourceKey } &quot; <Button Background=&quot;{StaticResource blueBrush}&quot; Foreground=&quot;{StaticResource whiteBrush}&quot;> Text </Button> To reference a resource dynamically: PropertyName=&quot; {DynamicResource  ResourceKey } &quot; <Button Background=&quot;{DynamicResource blueBrush}&quot; Foreground=&quot;{DynamicResource whiteBrush}&quot;> Text </Button>
Referencing Resources Programmatically FindResource  method: SolidColorBrush brush = (SolidColorBrush) this.FindResource(&quot;whiteBrush&quot;); SetResourceReference  method: this.myButton.SetResourceReference( Button.BackgroundProperty, &quot;whiteBrush&quot;); Resources  property: SolidColorBrush brush = (SolidColorBrush) this.Resources[ &quot;whiteBrush&quot;]; Or  TryFindResource
Reusing Resources Across Applications Merged resource dictionaries: <Page.Resources> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source=&quot;ResourcesyResources1.xaml&quot; /> <ResourceDictionary Source=&quot;ResourcesyResources2.xaml&quot; /> </ResourceDictionary.MergedDictionaries> </Page.Resources>   Merged Resource Dictionary MyResources2.xaml MyResources1.xaml
Demonstration: Sharing Resources in a  WPF Application ,[object Object],[object Object]
Defining Localized Resources WPF provides several localization features: ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Lesson:  Creating Consistent User Interfaces by Using Styles ,[object Object],[object Object],[object Object]
What Are Styles? You use styles to apply property values to elements: You typically define styles in  Resources  sections in XAML: Enables you to represent user interface properties such as font and background color as styles ,[object Object],[object Object],Style Control <Resources />
Defining Styles <Page.Resources> <Style x:Key=&quot;myStyle&quot; TargetType=&quot;{x:Type Label}&quot;> <Setter Property=&quot;Background&quot; Value=&quot;Blue&quot; /> <Setter Property=&quot;Foreground&quot; Value=&quot;White&quot; /> </Style> </Page.Resources>   Style for all  Label  elements To define a style that sets properties for all elements of a specified type: Define a < Style>  element 1 Set the  TargetType  property to an element type 2 Define < Setter>  child elements to set property values 3
Setting Styles Programmatically textblock1.Style = (Style)(Resources[&quot;TitleText&quot;]);  To apply a style programmatically: You can also modify styles programmatically to add, remove, or modify styles in the  Resources  collection Index into the  Resources  collection 1 Cast the resource object into a  Style  instance 2 Set the  Style  property on the control 3
Lesson:  Changing the Appearance of Controls by Using Control Templates ,[object Object],[object Object],[object Object],[object Object]
What Are Control Templates? Behavior class ControlTemplate Controls have built-in appearance and behavior: To customize the appearance and structure of a control: ,[object Object],[object Object],[object Object],Control
Defining a Control Template for a Content Control To define a control template for a content control: ,[object Object],[object Object],[object Object],<Style TargetType=&quot;Button&quot;>  <Setter Property=&quot;Template&quot;>   <Setter.Value>  <ControlTemplate TargetType=&quot;Button&quot;>  <Grid>  <Ellipse Fill=&quot;Blue&quot;/>  <ContentPresenter VerticalAlignment=&quot;Center&quot; HorizontalAlignment=&quot;Top&quot;/> </Grid>  </ControlTemplate>  </Setter.Value>  </Setter>  </Style>
Providing User Customization by Using  Template Bindings You use a template binding to define properties in the control template: Enables the control template to use ambient property values  <Style TargetType=&quot;ListBox&quot;> <Setter Property=&quot;Template&quot;> <Setter.Value> <ControlTemplate TargetType=&quot;ListBox&quot;> <Border  Background=&quot;{TemplateBinding ListBox.Background}&quot; CornerRadius=&quot;5&quot;> ... </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>
Demonstration: Changing the Appearance of Controls by Using Control Templates ,[object Object],[object Object]
Lesson: Enhancing User Interfaces by  Using Triggers and Animations ,[object Object],[object Object],[object Object],[object Object],[object Object]
What Are Triggers? ,[object Object],[object Object],A trigger sets properties or starts actions: Triggered by property value changes or events Trigger types: ,[object Object],[object Object],Trigger actions enable triggers to perform actions: ,[object Object],[object Object]
Defining Property Triggers To define a property trigger: Style TargetType=&quot;{x:Type ListBoxItem}&quot;>  <Setter Property=&quot;Opacity&quot; Value=&quot;0.5&quot; />  <Style.Triggers>  <Trigger Property=&quot;IsSelected&quot; Value=&quot;True&quot;> <Setter Property=&quot;Opacity&quot; Value=&quot;1.0&quot; /> </Trigger> </Style.Triggers>  </Style>  Define a  Trigger  element 1 Specify the property that initiates the trigger 2 Define the behavior of the trigger 3
What Are Animations? Animations enable you to animate controls and graphical objects: ,[object Object],[object Object],Types of animation: ,[object Object],[object Object],[object Object],[object Object]
Defining Animations You add animation elements to a Storyboard element to define animations <Rectangle Name=&quot;MyRectangle&quot; ...>  <Rectangle.Triggers>  <EventTrigger RoutedEvent=&quot;Mouse.MouseEnter&quot;>  <BeginStoryboard>  <Storyboard> <DoubleAnimation Duration=&quot;0:0:1&quot; Storyboard.TargetProperty=&quot;Opacity&quot; To=&quot;0.0&quot; /> </Storyboard> </BeginStoryboard>  </EventTrigger>  </Rectangle.Triggers>  </Rectangle>  EventTrigger Trigger action Storyboard Animation
Demonstration: Enhancing Controls by Using Triggers and Animations In this demonstration, you will see how to enhance the visual impact of controls by using triggers and animations
Lab Review ,[object Object],[object Object],[object Object],[object Object],[object Object]
Module Review and Takeaways
Windows Presentation Foundation Using Visual Studio 2010 & Expression Blend 4 Adil Ahmed Mughal
Module 4
Module 4: Data Binding  ,[object Object],[object Object],[object Object]
Lesson:  Overview of Data Binding ,[object Object],[object Object],[object Object]
The WPF Data-Binding Model UI Element Managed Object ADO.NET Data Source XML Data
Binding Sources and Binding Targets Data-binding components: ,[object Object],[object Object],[object Object],[object Object],Dependency Property   Property   Binding Target Object Binding Source Object
Data-Binding Modes Binding Target Binding Source Binding Object OneWay TwoWay OneWayToSource OneTime WPF supports four data-binding modes: ,[object Object],[object Object],[object Object],[object Object]
Lesson:  Creating a Data Binding ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Demonstration: Binding to Different Data Sources ,[object Object],[object Object]
Lesson:  Implementing Property Change Notification ,[object Object],[object Object],[object Object],[object Object]
What Are Property Change Notifications? Binding Target Binding Source Binding Object OneWay TwoWay OneWayToSource Bindings listen for changes in the target property and propagate them back to the source The time when the update happens is defined by the  UpdateSourceTrigger  property UpdateSourceTrigger
Propagating Property Change Notifications to a Binding Target public class Person :  INotifyPropertyChanged {  public event PropertyChangedEventHandler PropertyChanged; // Raise the PropertyChanged event  // when property values in the class change. } To implement the  INotifyPropertyChanged  interface: ,[object Object],[object Object],[object Object],Use dependency properties for visual elements
Propagating Value Changes to a Binding Source <TextBox Width=&quot;100&quot;> <TextBox.Text> <Binding Source=&quot;{StaticResource myData}&quot; Path=&quot;ColorName&quot; UpdateSourceTrigger=&quot;PropertyChanged&quot;  /> </TextBox.Text> </TextBox>   Specify the timing of binding source updates by using the  UpdateSourceTrigger  property ,[object Object],[object Object],[object Object],[object Object]
Demonstration: Triggering Source Updates ,[object Object],[object Object],[object Object]
Lab Review ,[object Object],[object Object],[object Object],[object Object]
Module Review and Takeaways ,[object Object],[object Object]
Module 5
Module 5: Data Bindings to Collections  ,[object Object],[object Object],[object Object]
Lesson:  Binding to Collections of Objects ,[object Object],[object Object],[object Object],[object Object],[object Object]
Overview of Binding to Collections You can bind item controls to a collection of objects For example: bind a  ListBox  control to a database result set ItemsSource   Property Value Binding Target Binding Source ItemsControl  Object Collection  Object OneWay Binding Object
What Is an Observable Collection? Venus Earth Mars Ceres Jupiter Saturn Uranus Neptune Pluto Eris Implements  INotifyCollectionChanged ItemsSource property Venus Earth Mars Jupiter Saturn Uranus Neptune Mercury Observable Collection New data items CollectionChanged
Defining an Observable Collection Class To define and use an observable collection class: public class NameList :  ObservableCollection<Person>   {  ... public class PersonName { ... } } <Window ...  xmlns:c=&quot;clr-namespace:MySample&quot; > <Window.Resources> <c:NameList x:Key=&quot;list&quot;/> </Window.Resources> <ListBox  ItemsSource = &quot;{Binding Source={StaticResource list}}&quot; /> </Window> ,[object Object],[object Object]
Introduction to LINQ . NET Language Integrated Query C# Visual Basic Others Standard Query Operators DLinq (ADO.NET) XLinq ( System.Xml ) CLR Objects Relational Data XML
Binding to ADO.NET Data Objects WPF enables you to bind to ADO.NET classes such as: ,[object Object],[object Object],[object Object],To bind to an ADO.NET object: ,[object Object],[object Object],[object Object]
Lesson: Presenting Data by  Using Data Templates ,[object Object],[object Object],[object Object],[object Object]
What Is a Data Template? Andy Jacobs 43 Robert Brown 34 Kelly Krout 63 Lola Jacobsen 23 MySample.Person MySample.Person MySample.Person MySample.Person Data Template
Defining and Using a Data Template <ListBox ItemsSource=&quot;{Binding Source={StaticResource list}}&quot;> <ListBox.ItemTemplate>   <DataTemplate>   <StackPanel>   <TextBlock Text=&quot;{Binding Path=FirstName}&quot; />   <TextBlock Text=&quot;{Binding Path=LastName}&quot;/>   </StackPanel>   </DataTemplate>   </ListBox.ItemTemplate> </ListBox> To define and use a data template: ,[object Object],[object Object]
Defining a Data Template as a Resource <Window.Resources> <DataTemplate x:Key=&quot;myDataTemplate&quot;>   <StackPanel>   <TextBlock Text=&quot;{Binding Path=FirstName}&quot; />   <TextBlock Text=&quot;{Binding Path=LastName}&quot;/>   </StackPanel>   </DataTemplate>   </Window.Resources> <ListBox   ItemsSource=&quot;{Binding Source={StaticResource list}}&quot; ItemTemplate=&quot;{StaticResource myDataTemplate}&quot;  /> You define reusable data templates as resources by setting the  x:Key  or  DataType  property on the  DataTemplate
Using Data Triggers in a Data Template <DataTemplate x:Key=&quot;myDataTemplate&quot;>   <DataTemplate.Triggers> <DataTrigger Binding=&quot;{Binding Path=Gender}&quot; Value=&quot;Male&quot;>   <Setter TargetName=&quot;border&quot;   Property=&quot;Foreground&quot; Value=&quot;Blue&quot;/> </DataTrigger> </DataTemplate.Triggers>   </DataTemplate> To define a data trigger: ,[object Object],[object Object],[object Object]
Module Review and Takeaways ,[object Object]
Contact Information ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Contenu connexe

Tendances

Windows Presentation Foundation & XAML
Windows Presentation Foundation & XAMLWindows Presentation Foundation & XAML
Windows Presentation Foundation & XAMLAlex Sooraj
 
Windows presentation foundation
Windows presentation foundationWindows presentation foundation
Windows presentation foundationNaga Harish M
 
Windows Presentation Foundation
Windows Presentation FoundationWindows Presentation Foundation
Windows Presentation FoundationTran Ngoc Son
 
WPF - Controls &amp; Data
WPF - Controls &amp; DataWPF - Controls &amp; Data
WPF - Controls &amp; DataSharada Gururaj
 
WPF - the future of GUI is near
WPF - the future of GUI is nearWPF - the future of GUI is near
WPF - the future of GUI is nearBartlomiej Filipek
 
Forms With Ajax And Advanced Plugins
Forms With Ajax And Advanced PluginsForms With Ajax And Advanced Plugins
Forms With Ajax And Advanced PluginsManuel Lemos
 
Creating Acessible floating labels
Creating Acessible floating labelsCreating Acessible floating labels
Creating Acessible floating labelsRuss Weakley
 
Best practices for upgrading vb 6.0 projects to vb.net
Best practices for upgrading vb 6.0 projects to vb.netBest practices for upgrading vb 6.0 projects to vb.net
Best practices for upgrading vb 6.0 projects to vb.netajmal_fuuast
 
Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6Jeanie Arnoco
 
The Audio User Experience for Widgets
The Audio User Experience for WidgetsThe Audio User Experience for Widgets
The Audio User Experience for Widgetstoddkloots
 
Better User Experience with .NET
Better User Experience with .NETBetter User Experience with .NET
Better User Experience with .NETPeter Gfader
 
Vb6.0 Introduction
Vb6.0 IntroductionVb6.0 Introduction
Vb6.0 IntroductionTennyson
 
Advisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScriptAdvisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScriptdominion
 
Visual basic
Visual basicVisual basic
Visual basicDharmik
 

Tendances (20)

WPF Fundamentals
WPF FundamentalsWPF Fundamentals
WPF Fundamentals
 
Windows Presentation Foundation & XAML
Windows Presentation Foundation & XAMLWindows Presentation Foundation & XAML
Windows Presentation Foundation & XAML
 
Windows presentation foundation
Windows presentation foundationWindows presentation foundation
Windows presentation foundation
 
Windows Presentation Foundation
Windows Presentation FoundationWindows Presentation Foundation
Windows Presentation Foundation
 
WPF - Controls &amp; Data
WPF - Controls &amp; DataWPF - Controls &amp; Data
WPF - Controls &amp; Data
 
WPF - the future of GUI is near
WPF - the future of GUI is nearWPF - the future of GUI is near
WPF - the future of GUI is near
 
Forms With Ajax And Advanced Plugins
Forms With Ajax And Advanced PluginsForms With Ajax And Advanced Plugins
Forms With Ajax And Advanced Plugins
 
Creating Acessible floating labels
Creating Acessible floating labelsCreating Acessible floating labels
Creating Acessible floating labels
 
Best practices for upgrading vb 6.0 projects to vb.net
Best practices for upgrading vb 6.0 projects to vb.netBest practices for upgrading vb 6.0 projects to vb.net
Best practices for upgrading vb 6.0 projects to vb.net
 
New Introductionfor Flash Designers
New Introductionfor Flash DesignersNew Introductionfor Flash Designers
New Introductionfor Flash Designers
 
Visusual basic
Visusual basicVisusual basic
Visusual basic
 
Chpater1
Chpater1Chpater1
Chpater1
 
Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6
 
The Audio User Experience for Widgets
The Audio User Experience for WidgetsThe Audio User Experience for Widgets
The Audio User Experience for Widgets
 
Better User Experience with .NET
Better User Experience with .NETBetter User Experience with .NET
Better User Experience with .NET
 
Meaning Of VB
Meaning Of VBMeaning Of VB
Meaning Of VB
 
Vb6.0 Introduction
Vb6.0 IntroductionVb6.0 Introduction
Vb6.0 Introduction
 
Advisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScriptAdvisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScript
 
Visual basic
Visual basicVisual basic
Visual basic
 
Visual basic
Visual basicVisual basic
Visual basic
 

En vedette

Beginning with wcf service
Beginning with wcf serviceBeginning with wcf service
Beginning with wcf serviceBinu Bhasuran
 
Wcf architecture overview
Wcf architecture overviewWcf architecture overview
Wcf architecture overviewArbind Tiwari
 
Angularjs interview questions and answers
Angularjs interview questions and answersAngularjs interview questions and answers
Angularjs interview questions and answersprasaddammalapati
 
Angular.js interview questions
Angular.js interview questionsAngular.js interview questions
Angular.js interview questionscodeandyou forums
 
Advanced WCF Workshop
Advanced WCF WorkshopAdvanced WCF Workshop
Advanced WCF WorkshopIdo Flatow
 
OBIEE - Introduction & building reports
OBIEE - Introduction & building reportsOBIEE - Introduction & building reports
OBIEE - Introduction & building reportsDeepika Raipuria
 
ASP.NET MVC Interview Questions and Answers by Shailendra Chauhan
ASP.NET MVC Interview Questions and Answers by Shailendra ChauhanASP.NET MVC Interview Questions and Answers by Shailendra Chauhan
ASP.NET MVC Interview Questions and Answers by Shailendra ChauhanShailendra Chauhan
 
29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview QuestionsArc & Codementor
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShareSlideShare
 
What to Upload to SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShareSlideShare
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShareSlideShare
 

En vedette (19)

An Overview Of Wpf
An Overview Of WpfAn Overview Of Wpf
An Overview Of Wpf
 
Beginning with wcf service
Beginning with wcf serviceBeginning with wcf service
Beginning with wcf service
 
Wcf architecture overview
Wcf architecture overviewWcf architecture overview
Wcf architecture overview
 
Angularjs interview questions and answers
Angularjs interview questions and answersAngularjs interview questions and answers
Angularjs interview questions and answers
 
WCF 4.0
WCF 4.0WCF 4.0
WCF 4.0
 
Angular.js interview questions
Angular.js interview questionsAngular.js interview questions
Angular.js interview questions
 
Threads c sharp
Threads c sharpThreads c sharp
Threads c sharp
 
An Introduction to WPF
An Introduction to WPFAn Introduction to WPF
An Introduction to WPF
 
Advanced WCF Workshop
Advanced WCF WorkshopAdvanced WCF Workshop
Advanced WCF Workshop
 
Wcf development
Wcf developmentWcf development
Wcf development
 
OBIEE - Introduction & building reports
OBIEE - Introduction & building reportsOBIEE - Introduction & building reports
OBIEE - Introduction & building reports
 
ASP.NET MVC Interview Questions and Answers by Shailendra Chauhan
ASP.NET MVC Interview Questions and Answers by Shailendra ChauhanASP.NET MVC Interview Questions and Answers by Shailendra Chauhan
ASP.NET MVC Interview Questions and Answers by Shailendra Chauhan
 
C#/.NET Little Wonders
C#/.NET Little WondersC#/.NET Little Wonders
C#/.NET Little Wonders
 
29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions
 
WPF Basics
WPF BasicsWPF Basics
WPF Basics
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare
 
What to Upload to SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShare
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShare
 

Similaire à 2 Day - WPF Training by Adil Mughal

Hnd201 Building Ibm Lotus Domino Applications With Ajax Plugins
Hnd201 Building Ibm Lotus Domino Applications With Ajax PluginsHnd201 Building Ibm Lotus Domino Applications With Ajax Plugins
Hnd201 Building Ibm Lotus Domino Applications With Ajax Pluginsdominion
 
WPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these daysWPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these daysDave Bost
 
C#.net, C Sharp.Net Online Training Course Content
C#.net, C Sharp.Net Online Training Course ContentC#.net, C Sharp.Net Online Training Course Content
C#.net, C Sharp.Net Online Training Course ContentSVRTechnologies
 
WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2Shahzad
 
JavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern ImplementationJavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern Implementationdavejohnson
 
Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0DivyaR219113
 
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?dcoletta
 
27 - Panorama Necto 14 component mode & java script - visualization & data di...
27 - Panorama Necto 14 component mode & java script - visualization & data di...27 - Panorama Necto 14 component mode & java script - visualization & data di...
27 - Panorama Necto 14 component mode & java script - visualization & data di...Panorama Software
 
MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1晟 沈
 
Optimizing Flex Applications
Optimizing Flex ApplicationsOptimizing Flex Applications
Optimizing Flex Applicationsdcoletta
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectureselliando dias
 
Complete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour TechnolabComplete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour TechnolabiFour Technolab Pvt. Ltd.
 
Code camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyCode camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyUna Daly
 
Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)dcoletta
 
06 win forms
06 win forms06 win forms
06 win formsmrjw
 
Windows Forms 2.0 Enhancements
Windows Forms 2.0 EnhancementsWindows Forms 2.0 Enhancements
Windows Forms 2.0 Enhancementsguestd115f
 
Visual Basic 2008 In 24 Hrs
Visual  Basic 2008 In 24 HrsVisual  Basic 2008 In 24 Hrs
Visual Basic 2008 In 24 HrsUiTM
 
Necto 16 training 20 component mode &amp; java script
Necto 16 training 20   component mode &amp; java scriptNecto 16 training 20   component mode &amp; java script
Necto 16 training 20 component mode &amp; java scriptPanorama Software
 

Similaire à 2 Day - WPF Training by Adil Mughal (20)

Test
TestTest
Test
 
Hnd201 Building Ibm Lotus Domino Applications With Ajax Plugins
Hnd201 Building Ibm Lotus Domino Applications With Ajax PluginsHnd201 Building Ibm Lotus Domino Applications With Ajax Plugins
Hnd201 Building Ibm Lotus Domino Applications With Ajax Plugins
 
WPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these daysWPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these days
 
C#.net, C Sharp.Net Online Training Course Content
C#.net, C Sharp.Net Online Training Course ContentC#.net, C Sharp.Net Online Training Course Content
C#.net, C Sharp.Net Online Training Course Content
 
WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2WPF Windows Presentation Foundation A detailed overview Version1.2
WPF Windows Presentation Foundation A detailed overview Version1.2
 
JavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern ImplementationJavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern Implementation
 
Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0
 
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?
 
27 - Panorama Necto 14 component mode & java script - visualization & data di...
27 - Panorama Necto 14 component mode & java script - visualization & data di...27 - Panorama Necto 14 component mode & java script - visualization & data di...
27 - Panorama Necto 14 component mode & java script - visualization & data di...
 
MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1
 
DDive11 - Mobile Development For Domino
DDive11 - Mobile Development For DominoDDive11 - Mobile Development For Domino
DDive11 - Mobile Development For Domino
 
Optimizing Flex Applications
Optimizing Flex ApplicationsOptimizing Flex Applications
Optimizing Flex Applications
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectures
 
Complete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour TechnolabComplete WPF Overview Tutorial with Example - iFour Technolab
Complete WPF Overview Tutorial with Example - iFour Technolab
 
Code camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyCode camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una Daly
 
Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)
 
06 win forms
06 win forms06 win forms
06 win forms
 
Windows Forms 2.0 Enhancements
Windows Forms 2.0 EnhancementsWindows Forms 2.0 Enhancements
Windows Forms 2.0 Enhancements
 
Visual Basic 2008 In 24 Hrs
Visual  Basic 2008 In 24 HrsVisual  Basic 2008 In 24 Hrs
Visual Basic 2008 In 24 Hrs
 
Necto 16 training 20 component mode &amp; java script
Necto 16 training 20   component mode &amp; java scriptNecto 16 training 20   component mode &amp; java script
Necto 16 training 20 component mode &amp; java script
 

Plus de Adil Mughal

Write cleaner, maintainable, and testable code in Android with MVVM
Write cleaner, maintainable, and testable code in Android with MVVMWrite cleaner, maintainable, and testable code in Android with MVVM
Write cleaner, maintainable, and testable code in Android with MVVMAdil Mughal
 
Code Sharing Between Windows Phone/Store Apps
Code Sharing Between Windows Phone/Store AppsCode Sharing Between Windows Phone/Store Apps
Code Sharing Between Windows Phone/Store AppsAdil Mughal
 
Community Contribution Experience
Community Contribution ExperienceCommunity Contribution Experience
Community Contribution ExperienceAdil Mughal
 
Web Development using ASP.NET MVC at HEC
Web Development using ASP.NET MVC at HECWeb Development using ASP.NET MVC at HEC
Web Development using ASP.NET MVC at HECAdil Mughal
 
Web development using ASP.NET MVC
Web development using ASP.NET MVC Web development using ASP.NET MVC
Web development using ASP.NET MVC Adil Mughal
 
Quality Assurance in SDLC
Quality Assurance in SDLCQuality Assurance in SDLC
Quality Assurance in SDLCAdil Mughal
 
Refactoring to SOLID Code
Refactoring to SOLID CodeRefactoring to SOLID Code
Refactoring to SOLID CodeAdil Mughal
 
What's New in Visual Studio 2010
What's New in Visual Studio 2010What's New in Visual Studio 2010
What's New in Visual Studio 2010Adil Mughal
 
Practical Enterprise Application Development
Practical Enterprise Application DevelopmentPractical Enterprise Application Development
Practical Enterprise Application DevelopmentAdil Mughal
 
DevNext - How we build applications in Industry
DevNext - How we build applications in IndustryDevNext - How we build applications in Industry
DevNext - How we build applications in IndustryAdil Mughal
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetAdil Mughal
 
Windows 7 For Geeks
Windows 7 For GeeksWindows 7 For Geeks
Windows 7 For GeeksAdil Mughal
 

Plus de Adil Mughal (12)

Write cleaner, maintainable, and testable code in Android with MVVM
Write cleaner, maintainable, and testable code in Android with MVVMWrite cleaner, maintainable, and testable code in Android with MVVM
Write cleaner, maintainable, and testable code in Android with MVVM
 
Code Sharing Between Windows Phone/Store Apps
Code Sharing Between Windows Phone/Store AppsCode Sharing Between Windows Phone/Store Apps
Code Sharing Between Windows Phone/Store Apps
 
Community Contribution Experience
Community Contribution ExperienceCommunity Contribution Experience
Community Contribution Experience
 
Web Development using ASP.NET MVC at HEC
Web Development using ASP.NET MVC at HECWeb Development using ASP.NET MVC at HEC
Web Development using ASP.NET MVC at HEC
 
Web development using ASP.NET MVC
Web development using ASP.NET MVC Web development using ASP.NET MVC
Web development using ASP.NET MVC
 
Quality Assurance in SDLC
Quality Assurance in SDLCQuality Assurance in SDLC
Quality Assurance in SDLC
 
Refactoring to SOLID Code
Refactoring to SOLID CodeRefactoring to SOLID Code
Refactoring to SOLID Code
 
What's New in Visual Studio 2010
What's New in Visual Studio 2010What's New in Visual Studio 2010
What's New in Visual Studio 2010
 
Practical Enterprise Application Development
Practical Enterprise Application DevelopmentPractical Enterprise Application Development
Practical Enterprise Application Development
 
DevNext - How we build applications in Industry
DevNext - How we build applications in IndustryDevNext - How we build applications in Industry
DevNext - How we build applications in Industry
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
 
Windows 7 For Geeks
Windows 7 For GeeksWindows 7 For Geeks
Windows 7 For Geeks
 

Dernier

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Dernier (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

2 Day - WPF Training by Adil Mughal

  • 1. Windows Presentation Foundation Using Visual Studio 2010 & Expression Blend 4 Adil Ahmed Mughal
  • 2.
  • 3.
  • 4.
  • 5.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. WPF Architecture WPF Core Components PresentationFramework Common Language Runtime PresentationCore milcore DirectX User32 Kernel Managed Code Unmanaged Code
  • 13. Defining User Interfaces in WPF <Window ... > ... <Label>Label</Label> <TextBox>TextBox</TextBox> <RichTextBox ... /> <RadioButton>RadioButton</RadioButton> <CheckBox>CheckBox</CheckBox> <Button>Button</Button> </Window>
  • 14.
  • 15. WPF Application Types Stand-Alone Applications XAML Browser Applications (XBAPs)
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. Building and Running a WPF Application You can build and run a WPF application in Visual Studio Stand-alone or browser application Stand-Alone Application Browser Application
  • 22.
  • 23.
  • 24. Handling WPF Control Events Implement event handler method in the code-behind file Specify an event handler in the XAML file <Button Name=&quot;Button1&quot; Click=&quot;Button1_Click&quot;> Click here </Button> public void Button1_Click( object sender, RoutedEventArgs e) { MessageBox.Show(&quot;Hello WPF&quot;); }
  • 25. What Are Routed Events? Root element Child element #1 Child element #2 Leaf element #1 Leaf element #2 WPF can route events up or down the element tree Event bubbling: Event routed up element tree Event tunneling: Event routed down element tree Tunnel Tunnel Bubble Bubble Item clicked
  • 26.
  • 27.
  • 28.
  • 29.
  • 31.
  • 32.
  • 33.
  • 34. WPF Layout Classes Canvas VirtualizingStackPanel DockPanel Grid StackPanel WrapPanel Panel Background Children ZIndex
  • 35.
  • 36. Notes Page Over-flow Slide. Do Not Print Slide. See Notes pane.
  • 37. Demonstration: Defining Layout by Using Grids In this demonstration, you will see how to use the Grid class
  • 38.
  • 39.
  • 40.
  • 41. Notes Page Over-flow Slide. Do Not Print Slide. See Notes pane.
  • 42.
  • 43.
  • 44. Notes Page Over-flow Slide. Do Not Print Slide. See Notes pane.
  • 45.
  • 46.
  • 47. Handling Item Selection Attach event handler <ListBox SelectionChanged=&quot;ListBox1_SelectionChanged&quot;> ... </ListBox> Define event handler public void ListBox1_SelectionChanged( object sender, SelectionChangedEventArgs e) { ... }
  • 48. Demonstration: Creating a User Interface by Using Items Controls In this demonstration, you will see how to use the ListBox class
  • 49.
  • 51.
  • 52.
  • 53. What Are Resources? Resources provide a simple way to reuse commonly defined objects and values For example: brushes, styles, and control templates XAML Code
  • 54.
  • 55. Referencing Resources in XAML To reference a resource statically: PropertyName=&quot; {StaticResource ResourceKey } &quot; <Button Background=&quot;{StaticResource blueBrush}&quot; Foreground=&quot;{StaticResource whiteBrush}&quot;> Text </Button> To reference a resource dynamically: PropertyName=&quot; {DynamicResource ResourceKey } &quot; <Button Background=&quot;{DynamicResource blueBrush}&quot; Foreground=&quot;{DynamicResource whiteBrush}&quot;> Text </Button>
  • 56. Referencing Resources Programmatically FindResource method: SolidColorBrush brush = (SolidColorBrush) this.FindResource(&quot;whiteBrush&quot;); SetResourceReference method: this.myButton.SetResourceReference( Button.BackgroundProperty, &quot;whiteBrush&quot;); Resources property: SolidColorBrush brush = (SolidColorBrush) this.Resources[ &quot;whiteBrush&quot;]; Or TryFindResource
  • 57. Reusing Resources Across Applications Merged resource dictionaries: <Page.Resources> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source=&quot;ResourcesyResources1.xaml&quot; /> <ResourceDictionary Source=&quot;ResourcesyResources2.xaml&quot; /> </ResourceDictionary.MergedDictionaries> </Page.Resources> Merged Resource Dictionary MyResources2.xaml MyResources1.xaml
  • 58.
  • 59.
  • 60.
  • 61.
  • 62. Defining Styles <Page.Resources> <Style x:Key=&quot;myStyle&quot; TargetType=&quot;{x:Type Label}&quot;> <Setter Property=&quot;Background&quot; Value=&quot;Blue&quot; /> <Setter Property=&quot;Foreground&quot; Value=&quot;White&quot; /> </Style> </Page.Resources> Style for all Label elements To define a style that sets properties for all elements of a specified type: Define a < Style> element 1 Set the TargetType property to an element type 2 Define < Setter> child elements to set property values 3
  • 63. Setting Styles Programmatically textblock1.Style = (Style)(Resources[&quot;TitleText&quot;]); To apply a style programmatically: You can also modify styles programmatically to add, remove, or modify styles in the Resources collection Index into the Resources collection 1 Cast the resource object into a Style instance 2 Set the Style property on the control 3
  • 64.
  • 65.
  • 66.
  • 67. Providing User Customization by Using Template Bindings You use a template binding to define properties in the control template: Enables the control template to use ambient property values <Style TargetType=&quot;ListBox&quot;> <Setter Property=&quot;Template&quot;> <Setter.Value> <ControlTemplate TargetType=&quot;ListBox&quot;> <Border Background=&quot;{TemplateBinding ListBox.Background}&quot; CornerRadius=&quot;5&quot;> ... </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>
  • 68.
  • 69.
  • 70.
  • 71. Defining Property Triggers To define a property trigger: Style TargetType=&quot;{x:Type ListBoxItem}&quot;> <Setter Property=&quot;Opacity&quot; Value=&quot;0.5&quot; /> <Style.Triggers> <Trigger Property=&quot;IsSelected&quot; Value=&quot;True&quot;> <Setter Property=&quot;Opacity&quot; Value=&quot;1.0&quot; /> </Trigger> </Style.Triggers> </Style> Define a Trigger element 1 Specify the property that initiates the trigger 2 Define the behavior of the trigger 3
  • 72.
  • 73. Defining Animations You add animation elements to a Storyboard element to define animations <Rectangle Name=&quot;MyRectangle&quot; ...> <Rectangle.Triggers> <EventTrigger RoutedEvent=&quot;Mouse.MouseEnter&quot;> <BeginStoryboard> <Storyboard> <DoubleAnimation Duration=&quot;0:0:1&quot; Storyboard.TargetProperty=&quot;Opacity&quot; To=&quot;0.0&quot; /> </Storyboard> </BeginStoryboard> </EventTrigger> </Rectangle.Triggers> </Rectangle> EventTrigger Trigger action Storyboard Animation
  • 74. Demonstration: Enhancing Controls by Using Triggers and Animations In this demonstration, you will see how to enhance the visual impact of controls by using triggers and animations
  • 75.
  • 76. Module Review and Takeaways
  • 77. Windows Presentation Foundation Using Visual Studio 2010 & Expression Blend 4 Adil Ahmed Mughal
  • 79.
  • 80.
  • 81. The WPF Data-Binding Model UI Element Managed Object ADO.NET Data Source XML Data
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87. What Are Property Change Notifications? Binding Target Binding Source Binding Object OneWay TwoWay OneWayToSource Bindings listen for changes in the target property and propagate them back to the source The time when the update happens is defined by the UpdateSourceTrigger property UpdateSourceTrigger
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 94.
  • 95.
  • 96. Overview of Binding to Collections You can bind item controls to a collection of objects For example: bind a ListBox control to a database result set ItemsSource Property Value Binding Target Binding Source ItemsControl Object Collection Object OneWay Binding Object
  • 97. What Is an Observable Collection? Venus Earth Mars Ceres Jupiter Saturn Uranus Neptune Pluto Eris Implements INotifyCollectionChanged ItemsSource property Venus Earth Mars Jupiter Saturn Uranus Neptune Mercury Observable Collection New data items CollectionChanged
  • 98.
  • 99. Introduction to LINQ . NET Language Integrated Query C# Visual Basic Others Standard Query Operators DLinq (ADO.NET) XLinq ( System.Xml ) CLR Objects Relational Data XML
  • 100.
  • 101.
  • 102. What Is a Data Template? Andy Jacobs 43 Robert Brown 34 Kelly Krout 63 Lola Jacobsen 23 MySample.Person MySample.Person MySample.Person MySample.Person Data Template
  • 103.
  • 104. Defining a Data Template as a Resource <Window.Resources> <DataTemplate x:Key=&quot;myDataTemplate&quot;> <StackPanel> <TextBlock Text=&quot;{Binding Path=FirstName}&quot; /> <TextBlock Text=&quot;{Binding Path=LastName}&quot;/> </StackPanel> </DataTemplate> </Window.Resources> <ListBox ItemsSource=&quot;{Binding Source={StaticResource list}}&quot; ItemTemplate=&quot;{StaticResource myDataTemplate}&quot; /> You define reusable data templates as resources by setting the x:Key or DataType property on the DataTemplate
  • 105.
  • 106.
  • 107.

Notes de l'éditeur

  1. Module 0: Introduction Course 6460A Welcome students to the course and introduce yourself. Provide a brief overview of your background to establish credibility. Ask students to introduce themselves and provide their backgrounds, product experience, and expectations of the course. Record student expectations on a whiteboard or flip chart that you can reference during class.
  2. Module 0: Introduction Course 6460A Describe the audience and the prerequisites for this course. This is an opportunity for you to identify students who may not have the appropriate background or experience to attend this course. Describe the course objectives.
  3. Module 0: Introduction Course 6460A Briefly describe each module and what students will learn. Be careful not to go into too much detail because the course is introduced in detail in Module 1. Explain how this course will meet students’ expectations by relating the information that is covered in individual modules to their expectations.
  4. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A
  5. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A
  6. Design were created a quarter of century ago Hardware Shift – Power, Resolution, GPU Give power back to ordinary user Computers are so much cooler in Movies  Module 1: Creating an Application by Using Windows Presentation Foundation Course 6461A
  7. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A Explain to the students that WPF is part of the Microsoft .NET Framework 3.0 family of technologies, which also includes Windows® Communication Foundation (WCF), Windows® Workflow Foundation (WF), and Windows CardSpace™ (WCS) identity selector. Explain that the architects of WPF designed it to be a declarative, programmable platform that incorporated the best features of the Web and the Windows® operating system by uniting user interfaces (UIs), documents, and media for developers and designers. Question: What other UI frameworks have you used? Answer: This question is designed to stimulate discussion among the students, so there is no definitive answer.
  8. Explain to the students that WPF contains three components that have been delivered on top of the existing Microsoft .NET Framework 2.0. Two of these components are managed components, and these are the components with which the students will interact. The other component is a highly optimized piece of unmanaged code that interfaces directly with the Microsoft DirectX® application programming interface (API) component of the .NET Framework. MIL (media integration core) Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A
  9. Briefly explain that you can build UIs in WPF by using either declarative code in Extensible Application Markup Language (XAML) or by writing imperative code in Microsoft Visual C#® or Microsoft Visual Basic ® . In almost all cases, the results are identical, but in practice, XAML is easier to write and maintain. In terms of UIs, there is nothing that cannot be done in both XAML and code. In Windows Forms, the serialization format for UIs was code, but in WPF, it is XAML. You could simply describe XAML as a serialization format for WPF classes. Question: Can you think of any other markup languages that behave in a similar way to XAML? Answer: The primary markup language that deals with UI in a similar way to WPF is HTML. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A
  10. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A Briefly summarize each feature on the slide, and explain that this course describes each of these features. Do not give technical details about how these features work at this stage.
  11. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A For stand-alone applications, summarize the UI elements that typically appear in a window. For example, explain that stand-alone applications are often menu-driven and contain controls that open new windows. Mention that stand-alone applications also contain standard plumbing such as an entry point and a message loop, but do not describe these characteristics in detail at this stage. For XML browser applications (XBAPs), emphasize that such applications are deployed onto a Web server and are invoked by using a Web browser. Mention that browser applications typically use hyperlinks to enable the user to navigate from one page to another. Tell students that Microsoft Visual Studio® 2008 development system provides automated support to help create both stand-alone and browser applications. This course describes how to create both types of application. Question: What applications have you created that would benefit from being written as XBAPs instead of stand-alone applications? Answer: This question is designed to stimulate discussion among the students, so there is no definitive answer.
  12. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A
  13. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A In this demonstration, you will show how to create the two project types in WPF by using Visual Studio 2008. High-level demonstration steps: Open Visual Studio 2008. On the File menu, point to New , and then click Project . In the New Project dialog box, in Templates , click WPF Application . In the Name box, type StandaloneApplication In the Location box, type E:\\Democode\\Starter In the Solution Name box, type ApplicationTypes and then click OK . Briefly explain that Visual Studio 2008 has created a fully functional stand-alone WPF application. Then explain the major components of the WPF designer in Visual Studio. Add a new WPF Browser Application project called BrowserApplication to the solution. Explain that the two application types look very similar in the designer. The only obvious difference between them is that the stand-alone application contains a &lt;Window&gt; element and the browser application contains a &lt;Page&gt; element. In the stand-alone application, in the ToolBox , drag a TextBox onto the designer, and then position it roughly in the top left of the form. In the ToolBox , drag a Button onto the designer, and then position it to the right of the TextBox . In the browser application, repeat Steps 10 and 11. Point out that both the experience and the XAML that is generated in both forms are identical. Explain that adding controls to the WPF designer is a very similar experience to using the designers in Windows Forms or ASP.NET. Leave Visual Studio 2008 open because you may want to refer to what Visual Studio has created for you during the remainder of the lesson.
  14. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A Remind students that Visual Studio 2008 enables them to create two types of application: stand-alone applications and browser applications. Emphasize that both types of application have an application XAML file. Describe the syntax of the application XAML file. Ask students if they are confident with XML syntax. If necessary, explain the XML syntax on the slide. Tell students that the XML namespaces have been elided on the slide so that the code can fit. Remind students that Visual Studio 2008 automatically generates this XAML file. After you explain the concepts, go to Visual Studio and show the students the App.xaml file and the App.xaml.cs file.
  15. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A Reiterate the difference between WPF windows and pages. A WPF window is a top-level window, whereas a WPF page is a browser-hosted page. Emphasize that WPF stand-alone applications can contain windows or pages, but that WPF browser applications can only contain pages. Describe the XAML on the slide. Point out the &lt;Window&gt; and &lt;Page&gt; XAML tags, and mention the corresponding Window and Page classes in WPF. Then, explain that the code-behind files contain event-handler code. Show students the XAML file for the window in the stand-alone application that you created in the demonstration. Then, show students the XAML file for the page in the browser application that you created in the demonstration.
  16. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A Describe the &lt;TextBox&gt; and &lt;Button&gt; elements on the slide. Tell students that these elements correspond to classes. Also tell students that the same elements are used in stand-alone applications and browser applications. Switch to the Visual Studio instance and reiterate that, for both the stand-alone application and the browser application, Visual Studio adds the &lt;Button&gt; and &lt;TextBox&gt; elements to the XAML.
  17. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A Tell students that they can build and run a WPF application in Visual Studio 2008. Explain that the UI of the application depends on whether it is a stand-alone or browser application. Build and run the two applications that you created during the demonstration. Remember to change the startup project to show both applications.
  18. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A
  19. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A Ask students if they are familiar with event handling in ASP.NET 2.0 Web applications. If they are, it will be useful because there are some similarities between the event-handling notation in ASP.NET 2.0 and WPF. Describe the events that are listed on the slide, and ask students to suggest other events that they may want to handle in a WPF application. Question: Can you suggest other events that you may want to handle in a WPF application? Answer: This question is designed to stimulate discussion among the students, so there is no definitive answer.
  20. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A Describe the XAML syntax for specifying an event handler for an event on a UI control. Emphasize the fact that the name of the event is predefined, but that the developer can specify the name of the event handler method. Describe the event handler methods. If time permits, switch to the stand-alone application that you created earlier and define an event handler method for the button that you click on the window.
  21. Explain that WPF supports event routing, and describe the terms &amp;quot;event bubbling&amp;quot; and &amp;quot;event tunneling.&amp;quot; Give some examples of where event bubbling and event tunneling are useful. Question: Can you think of some examples where event bubbling and event tunneling would be useful in your applications? Answer: This question is designed to stimulate discussion among the students, so there is no definitive answer. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A
  22. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A Explain the XAML file first. Briefly mention that StackPanel is a type of container element, and tell students that it is described in more detail later in the course. Explain how the StackPanel element handles button-click events for all of the buttons that are defined inside it. Explain the C# code-behind file for the event handler method. If necessary, show students how to implement a similar event handler method in Visual Basic. Emphasize that this method will handle click events on any of the three buttons defined in the StackPanel element. Point out that the second parameter is a RoutedEventArgs object, not a simple EventArgs object. Ask students how they might implement similar behavior if WPF did not support routed events. The answer is to define a separate Click attribute on each &lt;Button&gt; element, and specify the same event handler method in each case. Ask students why the routed events approach is better.
  23. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A Explain what a command is, and then explain the benefits of defining and using commands. Do not attempt to describe the syntax for commands because the following slide explains it. Describe the Copy , Cut , and Paste commands. Describe the four key concepts of commands in detail. Make sure that students understand how commands work before you look at the syntactic detail on the following slide. Question: Can you think of any situations where a command would benefit your application more than a standard event binding? Answer: This question is designed to stimulate discussion among the students, so there is no definitive answer. Commands represent actions independent from their user interface exposure
  24. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A In this demonstration, you will show how to define commands by using XamlPad. The code for this demonstration can be found at E:\\Democode\\Starter\\Xaml\\Demo2\\ High-level demonstration steps: Open Windows Explorer, and then go to the E:\\Democode\\Starter\\Xaml\\Demo2\\ folder. Right-click SimpleTextEditor.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . Briefly mention that Menu and MenuItem elements are described in more detail later in the course. Then, explain that the MenuItem element has a Command property that enables you to specify the logical meaning of the menu item. Describe the ApplicationCommands.Copy and ApplicationCommands.Paste commands. Emphasize that these are predefined commands. Tell students that it is also possible to define custom commands, but advise students to use predefined commands where they exist. In XamlPad, on the Edit menu, explain why the Copy menu (and possibly the Paste menu) item is disabled. Type some text in the text box, and then select a few characters. On the Edit menu, explain that the Copy menu item is now available because there is text available for copying. Click Copy , and then deselect the characters in the text box. On the Edit menu, click Paste . Explain that the copying and pasting of the text has been successful because the TextBox has already implemented these two commands. Close XamlPad. Question: When you click the Copy menu item, what makes it possible for the contents for the TextBox to be placed on the Clipboard? Answer: Commands are routed, in much the same way as RoutedEvents .
  25. Module 1: Creating an Application by Using Windows Presentation Foundation Course 6460A Review Questions Point the students to the appropriate section in the course so that they are able to answer the questions presented in this section.   Common Issues and Troubleshooting Tips Point the students to possible troubleshooting tips for the issues presented in this section.   Best Practices Help the students understand the best practices presented in this section. Ask students to consider these best practices in the context of their own business situations.   Tools Point out the location from which each key tool can be installed. Let students review the function and usage of each tool on their own. Remind students that they can use this as a master list to help them gather all the tools required to facilitate their application support work.
  26. Module 2: Building User Interfaces Course 6460A
  27. Module 2: Building User Interfaces Course 6460A
  28. Module 2: Building User Interfaces Course 6460A This is an animated slide. [Click 1] Describe the measurement pass of the layout process. [Click 2] Explain that an abstract rectangular bounding box surrounds each control, which you can get by calling GetLayout on a FrameworkElement . [Click 3] Describe the arrangement pass of the layout process. Ensure that students understand the iterative nature of the layout process and the effect of the parent and other child objects on the final size of each child object. Discuss the impact on performance of the recursive nature of the layout process.
  29. Module 2: Building User Interfaces Course 6460A Briefly describe the purpose and typical usage scenarios of each of the layout classes. Do not go into too much detail because they are illustrated in the following demonstrations. Mention that Panel -derived elements support the FlowDirection property to help with localization and globalization. Explain why DockPanel , Grid , and StackPanel are good choices for localizable user interfaces (UIs), but Grid is not. Question: When do you think you would use a custom layout class that derives from Panel ? Answer: A radial layout that arranges content in a circular fashion radiating from the center of the panel is an example of a custom layout. See “Custom Radial Panel Sample” on the MSDN Web site. &lt;http://msdn2.microsoft.com/en-us/library/ms771363.aspx&gt;
  30. Module 2: Building User Interfaces Course 6460A In this demonstration, you will show how to define layout by using panels. The code for this demonstration can be found at E:\\Democode\\Starter\\Xaml\\Demo1\\ Using the Canvas class: Open Windows Explorer and go to the E:\\Democode\\Starter\\Xaml\\Demo1\\ folder. Right-click Canvas.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . In XamlPad, show the &lt;Canvas&gt; element in the text editor pane, and then show the rendered output. In the text editor pane, change the values of the Canvas.Top and Canvas.Left attached properties for the two TextBlock elements to show the effect on the layout. Close XamlPad. Using the StackPanel class: In Windows Explorer, right-click StackPanel.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . In XamlPad, show the &lt;StackPanel&gt; element in the text editor pane, and then show the rendered output. In the text editor pane, change the values of the HorizontalAlignment and VerticalAlignment properties to show the effect on the layout of the child Button objects. Close XamlPad. Using the WrapPanel class: In Windows Explorer, right-click WrapPanel.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . In XamlPad, show the &lt;WrapPanel&gt; element in the text editor pane, and then show the rendered output. In the text editor pane, add an additional &lt;Button&gt; element to the &lt;WrapPanel&gt; to show the effect on the layout of the child button objects. Close XamlPad.
  31. Using the DockPanel class: In Windows Explorer, right-click DockPanel.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . In XamlPad, show the &lt;DockPanel&gt; element and its child &lt;Button&gt; elements in the text editor pane, and then show the rendered output. Explain that the order in which the child objects are declared affects their layout characteristics. Show that the first &lt;Button&gt; element is docked to the right, so its height fills the entire height of the DockPanel , but the last &lt;Button&gt; element is docked to the left, so its height is restricted by the top and bottom elements that are declared before it. Explain that setting the LastChildFill property on the DockPanel element ensures that the final &lt;Button&gt; element fills the remaining space. Close XamlPad. Question: When do you think it would be appropriate to use each of the different layout classes? Answer: Canvas: Use this class to position child objects at precise locations. Canvas is the only layout class that allows child objects to be drawn outside its bounds. StackPanel: Use this class to arrange child objects into a single line such as for a toolbar-style arrangement of buttons. WrapPanel: Use this class to position child objects in horizontal or vertical rows such as the list view in Windows Explorer. DockPanel: Use this class to dock child objects to the edges of the container such as a “paned” UI, similar to that found in Microsoft Office Outlook®. Question: What layout scenarios are not appropriate for these layout classes? Answer: These layout classes are not appropriate for grid-based or custom layouts. Module 2: Building User Interfaces Course 6460A 7
  32. Module 2: Building User Interfaces Course 6460A In this demonstration, you will show how to define layout by using grids. The code for this demonstration can be found at E:\\Democode\\Starter\\Xaml\\Demo2\\ High-level demonstration steps: Open Windows Explorer and go to the E:\\Democode\\Starter\\Xaml\\Demo2\\ folder. Right-click Grid.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . In XamlPad, show the &lt;Grid&gt; element in the text editor pane, and then explain the &lt;Grid.ColumnDefinitions&gt; and &lt;Grid.RowDefinitions&gt; child elements. Show that the layout of the child elements is specified by using the Grid.Row , Grid.Column , and Grid.ColumnSpan attached properties. In the text editor pane, change the ShowGridLines property to True to show the columns and rows that are defined for the Grid . Explain that the Margin property on child objects enables more precise positioning within the specified layout slot. Note: The margin values are specified in the order left, top, right, bottom. Close XamlPad. Question: When do you think it would be appropriate to use the Grid class to define layout? Answer: Use the Grid class to arrange child objects in rows and columns. The Grid class also enables you to layer child objects, span multiple rows or columns, and position child objects relative to the area of their cell boundaries.
  33. Module 2: Building User Interfaces Course 6460A
  34. Module 2: Building User Interfaces Course 6460A Briefly describe the Decorator content model, which decorates the single child object that is specified by the Child property. Explain that the Border class is a common Decorator .
  35. Module 2: Building User Interfaces Course 6460A In this demonstration, you will show how to create a user interface by using content controls. The code for this demonstration can be found at E:\\Democode\\Starter\\Xaml\\Demo3\\ Using the ContentControl class: Open Windows Explorer and go to the E:\\Democode\\Starter\\Xaml\\Demo3\\ folder. Right-click TextButton.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . In XamlPad, show the &lt;Button&gt; element in the text editor pane, and then show that the text content is assigned to the Content property. Close XamlPad. In Windows Explorer, right-click DateButton.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . In XamlPad, show the &lt;Button&gt; element in the text editor pane, and then show that the content of the button is a DateTime object. Close XamlPad. In Windows Explorer, right-click RectangleButton.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . In XamlPad, show the &lt;Button&gt; element in the text editor pane, and then show that the content of the button is a Rectangle element. Close XamlPad. In Windows Explorer, right-click ImageTextButton.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . In XamlPad, show the &lt;Button&gt; element in the text editor pane, and then show that the content of the button is a StackPanel element, which contains an Ellipse element and a TextBlock element. Close XamlPad.
  36. Using the Border Decorator class: In Windows Explorer, right-click DecoratorButton.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . In XamlPad, show the &lt;Button&gt; element in the text editor pane, and then show that the content of the button is a Border element. Show that the Border element defines the thickness of the border and the brush that WPF uses to paint the border. Show that the content of the Border element is a Rectangle element. Close XamlPad. Course 6460A Module 2: Building User Interfaces 12
  37. Module 2: Building User Interfaces Course 6460A Question: What is the difference between the ContentControl and HeaderedContentControl classes? Answer: Both classes can contain a single child item in the Content property, but the HeaderedContentControl class derives from the ContentControl class and additionally exposes the Header property. The Header content is typically used to label or identify the primary content. Examples of classes that derive from the HeaderedContentControl class include Expander , GroupBox , and TabItem .
  38. Module 2: Building User Interfaces Course 6460A In this demonstration, you will show how to create a user interface by using headered content controls. The code for this demonstration can be found at E:\\Democode\\Starter\\Xaml\\Demo4\\ Using the TabItem class: Open Windows Explorer and go to the E:\\Democode\\Starter\\Xaml\\Demo4\\ folder. Right-click HeaderedContent.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . In XamlPad, show the first &lt;TabItem&gt; element in the text editor pane. Show that the Header property is assigned a simple text value (“Page 1”), and then show that the content is also simple text. In the text editor pane, show the second &lt;TabItem&gt; element. Show that the Header property contains a WrapPanel , which itself contains an Ellipse and a Rectangle . In the rendered content pane, click Page 2 . Using the GroupBox class: In the text editor pane, show that the second &lt;TabItem&gt; content contains a &lt;GroupBox&gt; element. Show that the value of the Header property of the &lt;GroupBox&gt; element is assigned a simple text value. Show that the content of the &lt;GroupBox&gt; element is an &lt;Expander&gt; element. Using the Expander class: In the text editor pane, show the &lt;Expander&gt; element. Show that the value of the Header property is assigned a simple text value. Show that the &lt;Expander&gt; element also exposes the IsExpanded property, which determines whether the element is initially expanded. Show that the value of the Background property for the &lt;Expander&gt; element is a LinearGradientBrush .
  39. Show that the content of the &lt;Expander&gt; element is a &lt;TextBlock&gt; element. Close XamlPad. Module 2: Building User Interfaces Course 6460A
  40. Module 2: Building User Interfaces Course 6460A
  41. Module 2: Building User Interfaces Course 6460A Ensure that students understand the difference between the single item content model of the ContentControl and the multiple item content model of the ItemsControl . Question: What is the difference between the content model exposed by the ItemsControl class and the content model exposed by the ContentControl class? Answer: The ContentControl class exposes a single item content model, but the ItemsControl class exposes a content model that enables an element to contain multiple items.
  42. Module 2: Building User Interfaces Course 6460A Remind students that the code on this slide is specific to the ListBox class, but the principle is the same for other items controls.
  43. Module 2: Building User Interfaces Course 6460A In this demonstration, you will show how to create a user interface by using items controls. The code for this demonstration can be found at the following locations: If you are using Microsoft Visual Basic® development system: E:\\Democode\\Starter\\VB\\Demo5\\ If you are using Microsoft Visual C#® development tool: E:\\Democode\\Solution\\CS\\Demo5\\ High-level demonstration steps: In Microsoft Visual Studio® 2008 development system, open the Demo5.sln solution file. In Solution Explorer, double-click Window1.xaml . Show the all the different items that are contained within the &lt;ListBox&gt; collection of items. In the &lt;ListBox&gt; element, show the SelectionChanged event definition. In Solution Explorer, click View Code . In the code-behind file, show the SelectionChanged event handler. On the toolbar, click Start Debugging , and then click different items in the ListBox to show the message at the bottom of the window, which shows the type of the current selection. Close the demonstration application window, and then close Visual Studio 2008.
  44. Module 2: Building User Interfaces Course 6460A Review Questions Point the students to the appropriate section in the course so that they are able to answer the questions in this section. Tools Point out the location from which each key tool can be installed. Let students review the function and usage of each tool on their own. Remind students that they can use this as a master list to help them gather all the tools required to facilitate their application support work.
  45. Module 3: Customizing Appearance Course 6460A
  46. Module 3: Customizing Appearance Course 6460A
  47. Module 3: Customizing Appearance Course 6460A Describe what styles and control templates are, and advise students that styles and control templates are covered later in this module.
  48. Module 3: Customizing Appearance Course 6460A Explain why you would define resources at each of the scopes listed on the slide, and then describe the syntax for defining resources. Explain the Extensible Application Markup Language (XAML) example on the slide, and remind students that the &lt;Window.Resources&gt; element must be defined in a &lt;Window&gt; element.
  49. Module 3: Customizing Appearance Course 6460A Explain the difference between static resource lookup and dynamic resource lookup. Explain the syntax for referencing resources statically and dynamically, and then discuss the examples.
  50. Module 3: Customizing Appearance Course 6460A Describe why you might want to access resources programmatically, and then discuss the examples on the slide. Also, you may like to show an example of how to add or remove resources in the Resources collection.
  51. Module 3: Customizing Appearance Course 6460A Emphasize how useful it is to that you can define resources to reuse across multiple applications. Make sure that you spend enough time explaining what a merged dictionary is.
  52. Module 3: Customizing Appearance Course 6460A In this demonstration, you will show how to share resources in a Windows® Presentation Foundation (WPF) application. The solution code for this demonstration can be found at the following locations: If you are using Microsoft Visual Basic® development system: E:\\Democode\\Solution\\VB\\Demo1\\ If you are using Microsoft Visual C#® development tool: E:\\Democode\\Solution\\CS\\Demo1\\ High-level demonstration steps: Run Microsoft Visual Studio® 2008 development system. Open the Demo1 solution from the following locations: If you are using Visual Basic: E:\\Democode\\Starter\\VB\\Demo1\\ If you are using Visual C#: E:\\Democode\\Starter\\CS\\Demo1\\ In Solution Explorer, double-click Window1.xaml . In Window1.xaml, in the XAML pane, show the Window.Resources section, which contains two SolidColorBrush elements, a LinearGradientBrush element, and a Double value. Show the TextBlock element, which uses the two SolidColorBrush resources for the Background and Foreground properties. Show the Ellipse element, which uses one of the SolidColorBrush resources for the Fill property and uses the Double value to specify both the Width and Height properties. In Solution Explorer, click Window1.xaml , and then click View Code . Position the insertion point inside the changeResources_Click event handler, type ellipseFill and then press the TAB key twice. Explain that this code retrieves the LinearGradientBrush resource from the Resources collection and then assigns it to the Background property of the TextBlock element and the Fill property of the Ellipse element. Insert a new line after the code that you inserted in the previous step, type findResource and then press the TAB key twice. Explain that this code uses the TryFindResource method to locate the Double resource named dimension . Explain that this code also updates the value for the resource and updates the Resources collection. Explain that because the Ellipse element uses the DynamicResource markup extension, the Width and Height properties are updated when the resource is updated. Press F5 to run the application, click Change to show the effect of the code that you inserted and then close the application. Close Visual Studio 2008.
  53. Module 3: Customizing Appearance Course 6460A Emphasize that this topic only covers the WPF localization features at a high level. The topic of globalization and localization is too broad to be covered in depth in this course.
  54. Module 3: Customizing Appearance Course 6460A
  55. Module 3: Customizing Appearance Course 6460A Compare styles to Cascading Style Sheets; the concepts are similar, although the implementation details are quite different. Remind students about resources, as discussed in the previous lesson. Point out to students that many WPF controls contain other WPF controls, so creating a style that applies to all controls of a type can have broad impact.
  56. Module 3: Customizing Appearance Course 6460A Describe the syntax for defining styles. Explain the TargetType property, and describe the syntax for setting property values by using the Setter element.
  57. Module 3: Customizing Appearance Course 6460A Ask students why they might want to apply styles programmatically. Also explain that you can add new styles by using the Resources collection.
  58. Module 3: Customizing Appearance Course 6460A
  59. Module 3: Customizing Appearance Course 6460A Describe the Button element as an example of how a control provides behavior and appearance. Then explain that the default appearance is defined by a predefined ControlTemplate for each type of control, and tell students that they can completely redefine the appearance and structure of a control by defining a new ControlTemplate . Emphasize that this flexibility dramatically reduces the necessity to define custom control classes in WPF.
  60. Module 3: Customizing Appearance Course 6460A Explain the syntax for defining a ControlTemplate for a content control, and then describe the example on the slide in detail. Mention that the default ControlTemplate definition includes the appearance for states such as pressed, and focused, which are defined in triggers. Don’t go into too much detail because triggers and animations are covered later in this module in the topic Enhancing User Interfaces by Using Triggers and Animations.
  61. Module 3: Customizing Appearance Course 6460A Point out the syntactic similarity between defining TemplateBinding , StaticResource , and DynamicResource , and then describe the example on the slide in detail.
  62. Module 3: Customizing Appearance Course 6460A In this demonstration, you will show how to change the appearance of controls by using control templates. The code for this demonstration can be found at E:\\Democode\\Starter\\Xaml\\Demo2\\ Modifying the appearance of content controls by using control templates: Open Windows Explorer and go to the E:\\Democode\\Starter\\Xaml\\Demo2\\ folder. Right-click controlTemplates.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . Ensure that the rendered view and the XAML view are both visible. In XamlPad, show the Style element for the Button type. Show that it defines the appearance and structure of a Button by using a Rectangle and a ContentPresenter . Show that the ContentPresenter uses template binding to synchronize the HorizontalAlignment and VerticalAlignment properties with the Button declaration. Show the first row of buttons in the rendered view and show the corresponding XAML declarations. Highlight that the Button elements do not require any explicit bindings for their appearance to change. The Style definition applies to all Button elements. Show the second row of buttons in the rendered view and show the corresponding XAML declarations. Highlight that the Button elements all have a binding for the Template property. In the Page.Resources section, show the ControlTemplate resource named customButtonTemplate . Explain that this control template defines a different appearance. Highlight that the second row of buttons only bind their Template property to this different ControlTemplate ; the Foreground property defined in the custom Style still applies to the second row of buttons. Modifying the appearance of items controls by using control templates: In XamlPad, show the Style element for the ListBox type. Show that it defines the appearance and structure of a ListBox by using a horizontally aligned StackPanel in a ScrollViewer with a Border element to present rounded corners. Show that the StackPanel element uses the IsItemsHost property. Show that the Border element uses template binding to synchronize the Background and Margin properties with the ListBox declaration. Show the ListBox in the rendered view and show the corresponding XAML declaration. Highlight that the ListBox element is not explicitly bound to the Style . The Style applies to all ListBox elements. In the Page.Resources section, comment out the Style element for the ListBox to show the difference between the standard ListBox appearance and the custom Style . Close XamlPad.
  63. Module 3: Customizing Appearance Course 6460A
  64. Module 3: Customizing Appearance Course 6460A Describe what triggers are, and emphasize that they are extremely flexible and powerful. Describe what entry actions and exit actions are, and give some examples. Do not go into too much detail about animations and storyboards; they are covered in more detail later in this lesson.
  65. Module 3: Customizing Appearance Course 6460A Recap what a property trigger is, and then describe the example in detail.
  66. Module 3: Customizing Appearance Course 6460A Explain what animations are, and then describe the type of effect that you can achieve by using triggers.
  67. Module 3: Customizing Appearance Course 6460A Explain the syntax for defining an animation, remind students what an event trigger is, and then describe the example on the slide in detail.
  68. Module 3: Customizing Appearance Course 6460A In this demonstration, you will show how to enhance controls by using triggers and animations. The code for this demonstration can be found at: E:\\Democode\\Starter\\Xaml\\Demo3\\ High-level demonstration steps: Open Windows Explorer and go to the E:\\Democode\\Starter\\Xaml\\Demo3\\ folder. Right-click triggersAndAnimations.xaml , point to Open With , and then click Windows Presentation Foundation XamlPad Tool . Ensure that the rendered view and the XAML view are both visible. In the XAML pane, show that the Page.Resources section contains a Style definition for all Button controls. Show that the ControlTemplate.Resources section contains a number of Storyboard elements that define animations that animate the Opacity of different elements. Show that the ControlTemplate.Triggers section contains property triggers for the IsMouseOver and IsPressed properties. Show that each trigger contains a trigger action for each of the Trigger.EnterActions and Trigger.ExitActions properties that bind to the Storyboard elements defined in the ControlTemplate.Resources section. Show the XAML declaration for the Button elements. Show the rendered output and show the effect when you rest the mouse on a button, move it off, and click a button. Close XamlPad. Question: How could the same animation effects have been created without using property triggers? Answer: The same animation effects could have been creating by using event triggers for the MouseEnter , MouseLeave , and Click events.
  69. Module 3: Customizing Appearance Course 6460A Use the questions on the slide to guide the debriefing after students have completed the lab exercises. Question: How do you use multiple XAML resource files in a merged dictionary? Answer: You use multiple XAML resource files in a merged dictionary by adding each file as a ResourceDictionary element to the ResourceDictionary.MergedDictionaries element of an appropriate Resources property. Question: How do you create a Style that applies to all elements of a particular type? Answer: You create a Style that applies to all elements of a particular type by specifying the x:Type attribute for the Style element. Question: How do you modify the structure and appearance of a control? Answer: You modify the structure and appearance of a control by defining a new ControlTemplate . Question: How do you create a property trigger? Answer: You create a property trigger by adding a Trigger element to the Triggers property of a Style element. The Property and Value attributes define the triggering property and value. You add one or more Setter elements to the Trigger element to define the actions to take in response to the property trigger. Question: How do you create a Style that applies to selected elements? Answer: You create a Style that applies to selected elements by specifying an x:Key attribute for the Style element. You apply the style to selected elements by specifying the Style attribute for those elements, for example &lt;Button Style=“{DynamicResource myButtonStyle}” … /&gt;
  70. Module 3: Customizing Appearance Course 6460A Review Questions Point the students to the appropriate section in the course so that they are able to answer the questions in this section.   Best Practices Help the students understand the best practices presented in this section. Ask students to consider these best practices in the context of their own business situations. Tools Point out the location from which each key tool can be installed. Let students review the function and usage of each tool on their own. Remind students that they can use this as a master list to help them gather all the tools required to facilitate their application support work.
  71. Module 4: Data Binding Course 6460A
  72. Module 4: Data Binding Course 6460A
  73. Module 4: Data Binding Course 6460A Question: How does the variety of data sources that is available by using the WPF data-binding model compare to the data binding that you have used in your own applications? Answer: This question is designed to stimulate discussion among the students, so there is no definitive answer.
  74. Module 4: Data Binding Course 6460A Explain how a property in a binding source can be bound to a dependency property in the binding target. Give an example of binding the Text dependency property in a TextBox to a particular property in a managed object.
  75. Module 4: Data Binding Course 6460A Describe the Mode property on a Binding object. Explain how you set the Mode to support one-way data binding, two-way data binding, one-way-to-source data binding, or one-time data binding. Explain how each mode works, and describe the data flow in each case. Also give examples of why you would use each mode. Question: How do data-binding modes provided by WPF data binding compare to the data binding that you have used in your own applications? Answer: This question is designed to stimulate discussion among the students, so there is no definitive answer.
  76. Module 4: Data Binding Course 6460A
  77. Module 4: Data Binding Course 6460A In this demonstration, you will show how to bind to different data sources. The code for this demonstration can be found at the following locations: If you are using Microsoft Visual Basic® development system: E:\\Democode\\Starter\\VB\\Demo1\\ If you are using Microsoft Visual C#® development tool: E:\\Democode\\Starter\\CS\\Demo1\\ High-level demonstration steps: Run Microsoft Visual Studio 2008® development system. Open the Demo1 solution from the following locations: If you are using Visual Basic: E:\\Democode\\Starter\\VB\\Demo1\\ If you are using Visual C#: E:\\Democode\\Starter\\CS\\Demo1\\ In Solution Explorer, double-click Window1.xaml . In Window1.xaml, in the XAML pane, show the resources and XAML for each TabItem to illustrate different data-binding scenarios. Note: Each tab in the demonstration application demonstrates each of the different data binding scenarios.
  78. Module 4: Data Binding Course 6460A
  79. Module 4: Data Binding Course 6460A Ensure that students understand that the UpdateSourceTrigger property applies to TwoWay and OneWayToSource bindings only. The UpdateSourceTrigger property determines when the source is updated after changes in the target.
  80. Module 4: Data Binding Course 6460A Ask students whether they are familiar with the Microsoft .NET Framework event model, and briefly explain how it works if necessary. Then describe how binding source classes can raise a PropertyChanged event to indicate that a value has changed. Explain that the INotifyPropertyChanged interface specifies this event. Explain the difference between implementing the INotifyPropertyChanged interface and using dependency properties and when you would use each approach. Refer students to the Course Handbook, which includes a full sample implementation of a class that implements the INotifyPropertyChanged interface. Question: If you were implementing a custom UI control that exposes properties that you know you will need to animate in your application, which property change notification approach would you use? Answer: You would use a dependency properties to implement property change notification for the properties of custom UI control that you know you will need to animate in your application.
  81. Module 4: Data Binding Course 6460A Explain the purpose of the UpdateSourceTrigger property. Describe the implications of changing the value of this property in relation to the Text property of a TextBox , and then describe the example on the slide in detail.
  82. Module 4: Data Binding Course 6460A In this demonstration, you will show how to trigger source updates. The code for this demonstration can be found at the following locations: If you are using Visual Basic: E:\\Democode\\Starter\\VB\\Demo2\\ If you are using Visual C#: E:\\Democode\\Starter\\CS\\Demo2\\ Propagating changes to the binding target: Run Visual Studio 2008. Open the Demo2 solution from the following locations: If you are using Visual Basic: E:\\Democode\\Starter\\VB\\Demo2\\ If you are using Visual C#: E:\\Democode\\Starter\\CS\\Demo2\\ In Solution Explorer, double-click MyData source code file . In the code pane, show the code to implement the INotifyPropertyChanged interface and the other related methods and method calls. Propagating value changes to a binding source: In Solution Explorer, double-click Window1.xaml . In Window1.xaml, in the XAML pane, show the XAML to bind the TextBlock.Text properties to the MyData.ColorName property. Explain that the Text property of the second TextBlock and the Background of its parent WrapPanel are bound to the same property to show when the source object has been updated. Run the application to show the effect of setting the UpdateSourceTrigger property to Default , LostFocus , PropertyChanged , and Explicit . Note: The code behind file for Window1.xaml contains a Click event handler for the Submit button to the UpdateSource method explicitly when the UpdateSourceTrigger property is set to Explicit . Question: For which situations could you use the UpdateSourceTrigger property in your applications? Answer: This question is designed to stimulate discussion among the students, so there is no definitive answer.
  83. Module 4: Data Binding Course 6460A Use the questions on the slide to guide the debriefing after students have completed the lab exercises. Question: How do you create a data binding? Answer: You create a data binding by specifying the Binding attribute for the element, and then you specify properties such as Path , Source , and ElementName for the Binding . Question: Which interface do you use to implement property change notification? Answer: You use the INotifyPropertyChanged interface to implement property change notification for business objects. You use dependency properties to implement property change notification for visual elements. Question: Which interface do you use to implement a custom value converter? Answer: You use the IValueConverter interface to implement a custom value converter. Question: How do you define validation rules for a Binding ? Answer: You define validation rules for a Binding by adding validation rules to the Binding.ValidationRules collection.
  84. Module 4: Data Binding Course 6460A Review Questions Point the students to the appropriate section in the course so that they are able to answer the questions in this section.   Best Practices Help the students understand the best practices presented in this section. Ask students to consider these best practices in the context of their own business situations.
  85. Module 5: Data Binding to Collections Course 6460A
  86. Module 5: Data Binding to Collections Course 6460A
  87. Module 5: Data Binding to Collections Course 6460A Ask students if they are familiar with the concept of data binding to collections, and then describe the diagram on the slide. Question: How does the data collection binding model provided by WPF compare to other implementations that you have used? Answer: This question is designed to stimulate discussion among the students, so there is no definitive answer.
  88. Module 5: Data Binding to Collections Course 6460A This is an animated slide. Explain that an observable collection implements the INotifyCollectionChanged interface. [Click 1] Remind students that you typically bind an ItemsControl such as the ListBox shown on the slide to a data collection by using the ItemsSource property, which populates the list data. [Click 2] Explain that you can add new data items to an observable collection. [Click 3] When you add new data items to an observable collection, the collection raises the CollectionChanged event, and then the binding engine updates the ListBox list items. Question: Would the WPF observable collection model benefit any of your applications? Answer: This question is designed to stimulate discussion among the students, so there is no definitive answer.
  89. Module 5: Data Binding to Collections Course 6460A Describe the ObservableCollection class. Point out that it is a generic collection class, which means that you specify the types of object that are contained in an ObservableCollection instance. Refer students to the Course Handbook, which contains a full definition of the NameList class, and then explain how to bind a control to a custom collection class by setting the ItemsSource property to the custom collection class.
  90. Briefly describe the background of Language Integrated Query (LINQ) and the reason for its development. Explain that LINQ enables you to query any object that implements the IEnumerable&lt;T&gt; interface. Briefly explain the purpose and function of the LINQ to Structured Query Language (SQL) facility (DLinq) and the LINQ to XML facility (XLinq). This topic provides a foundation for the following topic, which describes binding to ADO.NET data objects by using DLinq. Question: Would you be able to use LINQ to simplify the process of querying in-memory information in any of your applications? Answer: This question is designed to stimulate discussion among the students, so there is no definitive answer. Module 5: Data Binding to Collections Course 6460A 7
  91. Module 5: Data Binding to Collections Course 6460A Explain that Windows® Presentation Foundation (WPF) enables you to create data bindings to any object that implements the IEnumerable interface, which includes ADO.NET objects. Describe the process for binding to ADO.NET objects. Refer the students to the full code example that is provided in the Course Handbook.
  92. Module 5: Data Binding to Collections Course 6460A
  93. Module 5: Data Binding to Collections Course 6460A This is an animated slide. Explain that, by default, a control calls the ToString method to display objects in a collection. Explain that overriding the ToString method is a possible solution, but it is limiting and inflexible. [Click 1] Explain that you use a data template to define the visual structure of your data objects. Question: How could you use the WPF data-templating model in your own applications? Answer: This question is designed to stimulate discussion among the students, so there is no definitive answer.
  94. Module 5: Data Binding to Collections Course 6460A Explain the syntax for defining a data template. Point out that the example in the slide assigns the data template to the ItemTemplate property on a ListBox . Also refer students to the Course Handbook, which describes how to define a data template and assign it to the ContentTemplate property of a content control.
  95. Module 5: Data Binding to Collections Course 6460A Describe how to define a data template as a resource, and remind students that this enables multiple controls to use the data template. Explain that the x:Key property defines a specific name for the data template, and controls must explicitly set their ItemTemplate or ContentTemplate property to use this data template. Refer students to the example in the Course Handbook that shows how to set the DataType property for a data template. Explain the syntax for defining a data template that has a DataType property and explain what this means.
  96. Module 5: Data Binding to Collections Course 6460A The example in the slide defines a data trigger that detects objects in the underlying collection that have a Gender property with the value Male . For such objects, the data trigger sets the UI control to have a blue border. Question: How could you use data triggers in your own applications? Answer: This question is designed to stimulate discussion among the students, so there is no definitive answer.
  97. Module 5: Data Binding to Collections Course 6460A Review Questions Point the students to the appropriate section in the course so that they are able to answer the questions in this section.   Best Practices Help the students understand the best practices presented in this section. Ask students to consider these best practices in the context of their own business situations. Tools Point out the location from which each key tool can be installed. Let students review the function and usage of each tool on their own. Remind students that they can use this as a master list to help them gather all the tools required to facilitate their application support work.