-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
39 lines (39 loc) · 1.53 KB
/
MainWindow.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
<dx:ThemedWindow
x:Class="DataTable.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:local="clr-namespace:DataTable"
Width="1000"
Height="800"
Title="MainWindow">
<dx:ThemedWindow.DataContext>
<local:MainViewModel />
</dx:ThemedWindow.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<dxg:GridControl
AutoGenerateColumns="AddNew"
ItemsSource="{Binding Items}"
Name="Grid">
<dxg:GridControl.View>
<dxg:TableView Name="view" />
</dxg:GridControl.View>
</dxg:GridControl>
<StackPanel Grid.Row="1">
<Button Content="Add a new column">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:CompositeCommandBehavior>
<dxmvvm:CommandItem Command="{Binding AddColumnCommand}" />
<dxmvvm:CommandItem Command="{DXCommand '@e(Grid).PopulateColumns()'}" />
</dxmvvm:CompositeCommandBehavior>
</dxmvvm:Interaction.Behaviors>
</Button>
</StackPanel>
</Grid>
</dx:ThemedWindow>