<UserControl x:Class="GridViewTabbedNavigation.TabbedNavigation"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:GridViewTabbedNavigation"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Grid>
        <Grid.CommandBindings>
            <CommandBinding Command="{x:Static local:GridNavigationCommands.First}" CanExecute="FirstCommand_CanExecute" Executed="FirstCommand_Executed" ></CommandBinding>
            <CommandBinding Command="{x:Static local:GridNavigationCommands.Previous}" CanExecute="PreviousCommand_CanExecute" Executed="PreviousCommand_Executed" ></CommandBinding>
            <CommandBinding Command="{x:Static local:GridNavigationCommands.Next}" CanExecute="NextCommand_CanExecute" Executed="NextCommand_Executed" ></CommandBinding>
            <CommandBinding Command="{x:Static local:GridNavigationCommands.Last}" CanExecute="LastCommand_CanExecute" Executed="LastCommand_Executed" ></CommandBinding>
        </Grid.CommandBindings>
        <Grid.Resources>
            <DataTemplate x:Key="DataRecordTemplate">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="100"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Column="0" Grid.Row="0" Text="Sender: "/>
                    <TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding Sender}"/>
                    <TextBlock Grid.Column="0" Grid.Row="1" Text="Subject: "/>
                    <TextBlock Grid.Column="1" Grid.Row="1" Text="{Binding Subject}"/>
                    <TextBlock Grid.Column="0" Grid.Row="2" Text="Size: "/>
                    <TextBlock Grid.Column="1" Grid.Row="2" Text="{Binding Size}"/>
                </Grid>
            </DataTemplate>
        </Grid.Resources>
        <TabControl>
            <TabItem Header="Gridview">
                <telerik:RadGridView x:Name="RadGridView1" telerik:Theming.Theme="Vista"></telerik:RadGridView>
            </TabItem>
            <TabItem Header="Navigation">
                <StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <Button Content="First" Width="50" Command="{x:Static local:GridNavigationCommands.First}"/>
                        <Button Content="Previous" Width="50" Command="{x:Static local:GridNavigationCommands.Previous}"/>
                        <Button Content="Next" Width="50" Command="{x:Static local:GridNavigationCommands.Next}"/>
                        <Button Content="Last" Width="50" Command="{x:Static local:GridNavigationCommands.Last}"/>
                    </StackPanel>
                    <TextBlock Margin="0,0,0,0" Text="Current Record:"></TextBlock>
                    <ContentPresenter ContentTemplate="{StaticResource DataRecordTemplate}" Content="{Binding CurrentItem}"/>
                </StackPanel>
            </TabItem>
        </TabControl>

    </Grid>
</UserControl>
