-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainView.xaml
41 lines (39 loc) · 1.83 KB
/
MainView.xaml
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
<UserControl x:Class="DXDocumentUIServiceSample.View.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:vm="clr-namespace:DXDocumentUIServiceSample.ViewModel">
<UserControl.DataContext>
<vm:MainViewModel />
</UserControl.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Header="Users">
<dxg:GridControl Name="grid" ItemsSource="{Binding Users}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="NickName" />
<dxg:GridColumn FieldName="Registration" />
<dxg:GridColumn FieldName="Rating" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AllowEditing="False"
AutoWidth="True"
FadeSelectionOnLostFocus="False"
VerticalScrollbarVisibility="Auto"
RowDoubleClickCommand="{Binding DoubleClickCommand}" />
</dxg:GridControl.View>
</dxg:GridControl>
</GroupBox>
<GroupBox Grid.Row="1">
<StackPanel Orientation="Horizontal">
<Button Margin="4,2"
Command="{Binding CreateDocumentCommand}"
CommandParameter="{Binding ElementName=grid, Path=CurrentItem}"
Content="Create Document" />
</StackPanel>
</GroupBox>
</Grid>
</UserControl>