1 / 11

virtual techdays

INDIA │ 18-20 august 2010. virtual techdays. Data Driven – Master/Details Business Forms with WPF 4 & EF4. Amar Nityananda │ Partner Technical Consultant, Microsoft. INDIA │ 18-20 august 2010. virtual techdays. Master-Details forms – a common scenario

ward
Download Presentation

virtual techdays

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. INDIA │ 18-20 august2010 virtual techdays Data Driven – Master/Details Business Forms with WPF 4 & EF4 AmarNityananda│ Partner Technical Consultant, Microsoft

  2. INDIA │ 18-20 august2010 virtual techdays • Master-Details forms – a common scenario • Demo: Creating master-details forms with WPF 4 and EF 4 • Understanding what happens behind the scenes • CollectionView & CollectionViewSource • BindingListCollectionView • Selector.IsSynchronizedWithCurrentItem S E S S I O N A G E N D A

  3. INDIA │ 18-20 august2010 virtual techdays • Shows a set of ‘master’ records and the user can drill down into further ‘details’ • Ideal for visualizing one-to-many relationships • Ex: Categories  Related products • Useful for displaying detailed information from tables having a lot of columns Master-Details forms – a common scenario

  4. INDIA │ 18-20 august2010 virtual techdays DEMO: Creating Master-Detail form with WPF4 and EF4 AmarNityananda│ Partner Technical Consultant, Microsoft

  5. INDIA │ 18-20 august2010 virtual techdays • Think of a CollectionView as a layer on top of a binding source collection. • A view does not change the underlying source collection, so a source collection can have multiple views associated with it i.e., you can display the same data in different ways. • All collections have an associated default collection view. We can get the default view using the CollectionViewSource.GetDefaultView method. Understanding what happens behind the scenes CollectionView

  6. INDIA │ 18-20 august2010 virtual techdays • CollectionViewSource is a proxy for a CollectionView class. • It has a View property that holds the actual view and a Source property that holds the source collection. Understanding what happens behind the scenes CollectionViewSource

  7. INDIA │ 18-20 august2010 virtual techdays • For collections that implement IBindingListView or IBindingList, the default collection view is BindingListCollectionView. • IBindingList is required for BindingListCollectionView • IBindingListView is an optional interface that gives additional functionalities. • Derives from CollectionView • Implements IComparer, IEditableCollectionView, IItemProperties • Useful methods: • AddNew • RemoveAt • CommitNew Understanding what happens behind the scenes BindingListCollectionView

  8. INDIA │ 18-20 august2010 virtual techdays • Set the IsSynchronizedWithCurrentItem property to true to ensure that the item selected always corresponds to the CurrentItem property in the ItemCollection. • true if the SelectedItem is always synchronized with the current item in the ItemCollection • false if the SelectedItem is never synchronized with the current item; • null (Nothing in Visual Basic) if the SelectedItem is synchronized with the current item only if the Selector uses a CollectionView. The default value is null (Nothing in Visual Basic) Understanding what happens behind the scenes Selector.IsSynchronizedWithCurrentItem

  9. INDIA │ 18-20 august2010 virtual techdays • CollectionView • http://msdn.microsoft.com/en-us/library/system.windows.data.collectionview.aspx • Details on the CollectionView class • BindingListCollectionView • http://msdn.microsoft.com/en-us/library/system.windows.data.bindinglistcollectionview.aspx • Details on the BindingListCollectionViewclass • Blogs • http://bea.stollnitz.com/blog/?p=13 – Bea on Master-detail • http://blogs.msdn.com/b/bethmassi/archive/2009/07/14/master-detail-data-binding-in-wpf-with-entity-framework.aspx - Beth on Master-Detail Data Binding in WPF with EF RESOURCES

  10. INDIA │ 18-20 august2010 virtual techdays • WPF4 deep-dive • Gowtham Prasad K N • 4:15-5:15, 18th August (Recording will be available on the VTD site) RELATED CONTENT

  11. THANKS│18-20 august2010 virtual techdays Amar.Nityananda@microsoft.com

More Related