<Window x:Class="DataSourceSamples.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:DataSourceSamples"
        Title="C1DataSource Samples" Height="500" Width="800">
    <Grid>
        <TabControl>
            <TabItem Header="Simple Binding">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <TextBlock Text="C1DataSource control allows you to show data from a RIA query in a data grid without any code, with XAML only. Optionally, filtering, sorting and grouping can be specified using descriptors in XAML. C1DataSource follows the standard RIA Services DomainDataSource object model, so you can easily port your existing applications to use C1DataSource." TextWrapping="Wrap"/>
                    <local:SimpleBinding Grid.Row="1"/>
                </Grid>
            </TabItem>
            <TabItem Header="Server-side Filtering">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <TextBlock Text="Filtering is performed on the server so no unnecessary data is fetched. Unlike the standard DomainDataSource, C1DataSource caches query results, so changing the filtering key to a recently used value does not cause a roundtrip to the server and the data grid is updated immediately. You can modify data in the grid and send changes to the server. Unlike in the standard DomainDataSource, changing the filter in C1DataSource does not require saving or canceling your changes. So you can navigate through several categories and make changes without having to save them for each category separately." TextWrapping="Wrap"/>
                    <local:ServerSideFiltering Grid.Row="1"/>
                </Grid>
            </TabItem>
            <TabItem Header="Master-detail binding">
                <local:MasterDetailBinding />
            </TabItem>
            <TabItem Header="Paging">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <TextBlock Text="Paging data with C1DataSource is as easy as setting the PageSize property. Unlike in the standard DomainDataSource, changing the current page in C1DataSource does not flush/cancel your changes. You can navigate through pages and make changes without having to save them for every page separately." TextWrapping="Wrap"/>
                    <local:C1DataGridPaging Grid.Row="1"/>
                </Grid>
            </TabItem>
            <TabItem Header="Large datasets: Virtual Mode">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <TextBlock Text="With the innovative virtual mode technology you can display massive datasets of many thousands or even millions of records in data grids and other standard controls without paging, with no code changes, and all by setting one Boolean property. Chunks of data are fetched on demand, transparently to the developer and the end user. You can page down or scroll to an arbitrary position, and the needed entities will be fetched and displayed automatically." TextWrapping="Wrap"/>
                    <local:C1DataGridLargeDataSet Grid.Row="1"/>
                </Grid>
            </TabItem>
            <TabItem Header="Custom Columns">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <TextBlock Text="You can use LINQ operators to reshape data from C1DataSource, for example entities are projected using the select operator. Properties in the result type can be bound to arbitrary pure expressions. They are displayed by the data grid columns. The columns are modifiable. It is an important feature that would be difficult to implement on your own for this customized view. Especially adding and deleting rows, which is also supported (try the Add/Delete buttons)." TextWrapping="Wrap"/>
                    <local:CustomColumns Grid.Row="1"/>
                </Grid>
            </TabItem>
            <TabItem Header="Live views">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <TextBlock Text="Live views are LINQ query results that are continuously kept up to date. Changes in source data are automatically reflected in live views." TextWrapping="Wrap"/>
                    <local:ClientSideQuerying Grid.Row="1"/>
                </Grid>
            </TabItem>
        </TabControl>
    </Grid>
</Window>
