Presentation is loading. Please wait.

Presentation is loading. Please wait.

Avalon – Using Data In Your Applications

Similar presentations


Presentation on theme: "Avalon – Using Data In Your Applications"— Presentation transcript:

1 Avalon – Using Data In Your Applications
7/19/2018 2:50 AM Session Code: CLI306 Avalon – Using Data In Your Applications Namita Gupta Program Manager Microsoft Corporation © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

2 Agenda UI binding Flexible Styling of data
7/19/2018 2:50 AM Agenda UI binding Flexible Styling of data Integration with Data Models What you should do until Longhorn ships © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

3 UI Binding Bind to any property of any Element
7/19/2018 2:50 AM UI Binding Element Bind to any property of any Element Binding to any property of any CLR object Dynamic TwoWay Transformable Property Transformer Binding Collection “Data Item” Property © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

4 Creating Simple Bindings
7/19/2018 2:50 AM Creating Simple Bindings Compact Syntax <TextBox Text=“*Bind(Path=CaseName)”/> Verbose Syntax <TextBox> <TextBox.Text> <Bind Path=“CaseName”/> </TextBox.Text> </TextBox> Code Bind b = new Bind(); b.Path = “CaseName”; TextBox tb = new TextBox(); tb.SetBinding(TextBox.TextProperty, b); TextBox Element Text Binding LegalCase CLR Object CaseName class LegalCase{ string CaseName {get;set;} } © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

5 DataContext DataContext DockPanel class LegalCase{
7/19/2018 2:50 AM DataContext class LegalCase{ string CaseName {get;set;} string Client {get;set;} double HoursWorked{get;set;} double Cost{get;set;} } DataContext DockPanel Text TextBox Text Text Text Text CaseName Client Cost © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

6 7/19/2018 2:50 AM UI Binding © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

7 Agenda UI binding Flexible styling of data
7/19/2018 2:50 AM Agenda UI binding Flexible styling of data Integration with Data Models What you should do until Longhorn ships © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

8 UI-Centric Model “Data” as UI Elements <ListBox>
7/19/2018 2:50 AM UI-Centric Model “Data” as UI Elements <ListBox> <ListItem>Melissa vs Dick</ListItem> <ListItem>Harry vs Sally< /ListItem> <ListItem>Luke vs Darth Vader</ListItem> <ListItem>Joe vs Ben</ListItem> </ListBox> SelectedItem returns a ListItem element Rendering is the UIElement © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

9 Data-Centric Model Melissa vs Dick Controls understand data content
7/19/2018 2:50 AM Data-Centric Model Controls understand data content <ListBox> <LegalCase CaseName=“Melissa vs Dick”/> <LegalCase CaseName=“Harry vs Sally”/> <LegalCase CaseName=“Luke vs Darth Vader”/> <LegalCase CaseName=“Joe vs Ben”/> </ListBox> SelectedItem returns Selected LegalCase object Rendering is determined by Data Style <Style def:Name=“*typeof(LegalCase)”> <Style.VisualTree> <DockPanel> <Image Source=“images/case.png”/> <Text Text=“*Bind(Path=Name)”/></DockPanel> </Style.VisualTree> </Style> Melissa vs Dick © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

10 Key Concepts Controls consume generic content
7/19/2018 2:50 AM Key Concepts Controls consume generic content - string, CLR objects, UIElement You define Presentation of the Content. Presentation is flexible, reusable and easily modifiable. © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

11 Controls with Content Singular content (Button, Hyperlink)
7/19/2018 2:50 AM Controls with Content Singular content (Button, Hyperlink) ContentControl Content ContentStyle Plural Content (ListBox, Menu, ComboBox) ItemsControl Items ItemStyle Lazy instantiation of UI (Virtualization) © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

12 Data Styling & Master Detail
7/19/2018 2:50 AM Data Styling & Master Detail © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

13 7/19/2018 2:50 AM Infragistics © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

14 -- Joe Dour, VP Infragistics
7/19/2018 2:50 AM “We were able to create a grid that supports hierarchical data by leveraging the ListBox control in the framework” “We were able to implement the grid without writing a single line of code for doing rendering, hit testing, scrolling or measuring text. All of this functionality, and more, we got for free” “In addition, the styling infrastructure of the framework allowed us to expose an incredible level of customization support for users of the control with minimal effort” -- Joe Dour, VP Infragistics © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

15 Dynamic Collection And Views
ICollectionChange Automatic update of UI for any inserts or deletes in the underlying data CollectionView Current Record semantics Sort Filter Multiple views over a collection We provide an implementation based on ArrayList © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

16 CollectionViews 7/19/2018 2:50 AM
© Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

17 Agenda UI binding Flexible styling of data
7/19/2018 2:50 AM Agenda UI binding Flexible styling of data Integration with Data Models What you should do until Longhorn ships © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

18 7/19/2018 2:50 AM Data Models Easily use WinFS, Indigo, Xml, DataSet, all CLR objects in Avalon UI Out of the box set of DataSources to easily work with Data Models in Longhorn Asynchronous access to data Declarative solution Extensible model with Simple Interface © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

19 WinFS – Local Data Store
7/19/2018 2:50 AM WinFS – Local Data Store Where all end-user data lives in Longhorn A data model built on relational database technology and NTFS A set of domain-specific schemas with extensibility for custom schemas Has API for queries that return strongly typed objects representing the data © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

20 WinFS In Avalon Dynamic bindings to WinFS objects WinFSDataSource
<WinFSDataSource.Query> <Query TargetType=“*typeof(LegalCase)” xmlns=“winfs”/> </WinFSDataSource.Query> </WinFSDataSource> WinFSDataSource Async data access Declarative solution © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

21 7/19/2018 2:50 AM Xml In Avalon Support Databinding to XML DOM and XPathDocument in Longhorn Enable binding using XPATH <TextBox Text= “*Bind(Path= /> TwoWay, transformable, dynamic databinding to nodes XmlDataSource Inline Xml Read Xml from file Async Load Xml from a server or Web service © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

22 ADO.NET DataSet Dynamic bindings to DataSet, DataTables and DataRows
Enable binding to fields and walk relationships <TextBox Text=“*Bind(Path=CustomerOrders.Date)”/> SqlDataSource Async data load Declarative solutions © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

23 CaseBuilder – Xml, DataSet
7/19/2018 2:50 AM CaseBuilder – Xml, DataSet © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

24 WebServices Go see talk CLI 311
7/19/2018 2:50 AM WebServices Go see talk CLI 311 Using Indigo effectively in Avalon applications Correct way to do Asynchronous data access in Avalon © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

25 Agenda UI binding Flexible styling of data
7/19/2018 2:50 AM Agenda UI binding Flexible styling of data Integration with Data Models What you should do until Longhorn ships © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

26 What Should You Do Until Longhorn Ships?
7/19/2018 2:50 AM What Should You Do Until Longhorn Ships? Move to managed code today - use Windows Forms Windows Forms provides a seamless path to Longhorn Avalon supports Windows Forms Data Model (IBindingList) IPropertyChange in System in Whidbey Windows Forms supports IPropertyChange Separate business logic and UI © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

27 Summary Pervasive use of Databinding Rich Visualization of data
7/19/2018 2:50 AM Summary Pervasive use of Databinding Rich Visualization of data Your Data, Your Way © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

28 Community Resources Get your questions answered!
7/19/2018 2:50 AM Community Resources Get your questions answered! Newsgroups microsoft.public.windows.developer.winfx.avalon Client Track Lounge - Concourse Foyer Connect with Microsoft client product teams and PDC 2003 Speakers Ask The Experts Tuesday 7 pm – 9 pm in Hall G,H PDC Weblogs © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

29 © 2003-2004 Microsoft Corporation. All rights reserved.
7/19/2018 2:50 AM © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Download ppt "Avalon – Using Data In Your Applications"

Similar presentations


Ads by Google