/
MainPage.xaml
43 lines (41 loc) · 2.08 KB
/
MainPage.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
42
43
<UserControl x:Class="DXGrid_GridLayout.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:local="clr-namespace:DXGrid_GridLayout" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<dxg:GridControl x:Name="grid" dx:DXSerializer.SerializationID="grid"
dx:DXSerializer.StoreLayoutMode="All"
dxg:GridSerializationOptions.AddNewColumns="False"
dxg:GridSerializationOptions.RemoveOldColumns="False">
<dxg:GridControl.Columns>
<dxg:GridColumn x:Name="colIssueName" FieldName="IssueName" />
<dxg:GridColumn x:Name="colIssueType" FieldName="IssueType" />
<dxg:GridColumn x:Name="colPrivate" FieldName="IsPrivate">Private</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True" />
</dxg:GridControl.View>
</dxg:GridControl>
<StackPanel Grid.Row="1" Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Button Margin="1" Click="Button_Click">AddNewColumn</Button>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button Margin="1" Click="SaveButton_Click">Save Layout</Button>
<Button x:Name="restoreButton" Margin="1" Click="LoadButton_Click" IsEnabled="{Binding IsLayoutSaved}">
Restore Layout
</Button>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>