/
MainWindow.xaml
37 lines (37 loc) · 1.72 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
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" x:Class="E2042.MainWindow"
xmlns:local="clr-namespace:E2042"
Title="MainWindow" Height="350" Width="525">
<Window.DataContext>
<local:ViewModel/>
</Window.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<dxg:GridControl AutoGenerateColumns="AddNew" ItemsSource="{Binding List}" Name="gridControl1" >
<mvvm:Interaction.Behaviors>
<local:GridControlFitBehavior/>
</mvvm:Interaction.Behaviors>
<dxg:GridControl.View>
<dxg:TableView Name="tableView1"/>
</dxg:GridControl.View>
</dxg:GridControl>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1">
<StackPanel.Resources>
<Style TargetType="Button">
<Setter Property="Width" Value="110"/>
<Setter Property="Margin" Value="10,0"/>
</Style>
</StackPanel.Resources>
<Button Content="Change ItemsSource" Command="{Binding ChangeSource}" />
<Button Content="Change some item" Command="{Binding ChangeItem}"/>
<Button Content="Add some item" Command="{Binding AddNewItem}"/>
<Button Content="Delete some item" Command="{Binding DeleteItem}"/>
</StackPanel>
</Grid>
</Window>