PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Visual Studio 2008/CSWPFPaging/MainWindow.xaml

#
XAML | 36 lines | 33 code | 3 blank | 0 comment | 0 complexity | c1594d4b7d06294be5ee5e4f5234a1c5 MD5 | raw file
 1<Window x:Class="CSWPFPaging.MainWindow"
 2    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 3    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 4    Title="WPF Paging Sample" Height="431" Width="579" Loaded="Window_Loaded">
 5    <Grid>
 6        <TextBlock Height="21" Margin="18,10,19,0" Name="textBlock1" VerticalAlignment="Top" 
 7                   Text="This sample demonstrates how to page data in WPF."/>
 8        
 9        <ListView Margin="18,32,20,45" Name="listView1" ItemsSource="{Binding}">
10            <ListView.View>
11                <GridView>
12                    <GridViewColumn Header="ID" DisplayMemberBinding="{Binding ID}" Width="50"/>
13                    <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" Width="100"/>
14                    <GridViewColumn Header="Age" DisplayMemberBinding="{Binding Age}" Width="100"/>
15                    <GridViewColumn Header="Country" DisplayMemberBinding="{Binding Country}" Width="100"/>
16                </GridView>
17            </ListView.View>
18        </ListView>
19        
20        <Button Height="23" HorizontalAlignment="Left" Margin="18,0,0,16" Name="btnFirst" 
21                VerticalAlignment="Bottom" Width="75" Click="btnFirst_Click">First</Button>
22        <Button Height="23" HorizontalAlignment="Left" Margin="115,0,0,16" Name="btnPrev" 
23                VerticalAlignment="Bottom" Width="75" Click="btnPrev_Click">Previous</Button>
24        <Button Height="23" Margin="213,0,269,16" Name="btnNext" 
25                VerticalAlignment="Bottom" Click="btnNext_Click">Next</Button>
26        <Button Height="23" HorizontalAlignment="Right" Margin="0,0,167,16" Name="btnLast" 
27                VerticalAlignment="Bottom" Width="75" Click="btnLast_Click">Last</Button>
28        
29        <TextBlock Height="21" Margin="442,0,93,18" Name="tbCurrentPage" 
30                   VerticalAlignment="Bottom" />
31        <TextBlock Height="21" HorizontalAlignment="Right" Margin="0,0,67,17" Name="textBlock3" 
32                   VerticalAlignment="Bottom" Width="20" Text="/"/>
33        <TextBlock Height="21" HorizontalAlignment="Right" Margin="0,0,45,18" Name="tbTotalPage" 
34                   VerticalAlignment="Bottom" Width="28" />
35    </Grid>
36</Window>