-
Notifications
You must be signed in to change notification settings - Fork 298
Expand file tree
/
Copy pathListViewExample.xaml
More file actions
42 lines (42 loc) · 2.32 KB
/
Copy pathListViewExample.xaml
File metadata and controls
42 lines (42 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<UserControl
x:Class="WPFDevelopers.Samples.ExampleViews.Basics.ListViewExample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
Background="{DynamicResource WD.BackgroundBrush}">
<controls:CodeViewer Header="ListView">
<StackPanel Margin="20,10">
<TextBlock Margin="0,20,0,0" FontSize="20" Text="ListView" />
<UniformGrid Height="300" Margin="0,10" Columns="2">
<ListView
wd:ElementHelper.CornerRadius="3"
FontSize="20"
ItemsSource="{Binding UserCollection, RelativeSource={RelativeSource AncestorType=UserControl}}">
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Date}" Header="Date" />
<GridViewColumn DisplayMemberBinding="{Binding Name}" Header="Name" />
<GridViewColumn Width="Auto" DisplayMemberBinding="{Binding Address}" Header="Address" />
</GridView>
</ListView.View>
</ListView>
<ListView
Margin="10,0"
BorderThickness="0"
ItemsSource="{Binding UserCollection, RelativeSource={RelativeSource AncestorType=UserControl}}">
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Date}" Header="Date" />
<GridViewColumn DisplayMemberBinding="{Binding Name}" Header="Name" />
<GridViewColumn Width="Auto" DisplayMemberBinding="{Binding Address}" Header="Address" />
</GridView>
</ListView.View>
</ListView>
</UniformGrid>
</StackPanel>
<controls:CodeViewer.SourceCodes>
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/Basics/ListViewExample.xaml" CodeType="Xaml" />
</controls:CodeViewer.SourceCodes>
</controls:CodeViewer>
</UserControl>