Welcome to the Xceed Community | Help
Community Search  
More Search Options

Providing unbound data

Sort Posts: Previous Next
  •  10-08-2008, 3:58 PM Post no. 28129

    Providing unbound data

    The following example demonstrates how to add Person data to a custom ObservableCollection of Person objects.

    <Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"
          xmlns:local="clr-namespace:Xceed.Wpf.Documentation"
          xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase">
      <Grid.Resources>

       <local:PersonObservableCollection x:Key="personData">
         <local:Person FirstName="Jenny"
                       LastName="Beland"
                       Occupation="Writer"/>
         <local:Person FirstName="Francois"
                       LastName="Carignan"
                       Occupation="Developer"/>
         <local:Person FirstName="Pascal"
                       LastName="Bourque"
                       Occupation="Developer"/>
         <local:Person FirstName="Michel"
                       LastName="Fortin"
                       Occupation="Developer"/>
         <local:Person FirstName="Marc"
                       LastName="Laroche"
                       Occupation="Developer"/>
         <local:Person FirstName="Pierre-Luc"
                       LastName="Ledoux"
                       Occupation="Developer"/>
         <local:Person FirstName="Mathieu"
                       LastName="Drimonakos"
                       Occupation="TechnicalSupport"/>
         <local:Person FirstName="Catherine"
                       LastName="Sauzede"
                       Occupation="Infograph"/>
       </local:PersonObservableCollection>

       <xcdg:DataGridCollectionViewSource x:Key="cvs_person"
                                          ItemType="{x:Type local:Person}"
                                          Source="{StaticResource personData}">

    View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.