This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
/
Window1.xaml
37 lines (33 loc) · 1.8 KB
/
Window1.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 x:Class="WpfApplication1.Window1"
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:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:local="clr-namespace:WpfApplication1"
Title="Window1" Height="314" Width="613"
dx:ThemeManager.ThemeName="Azure"
>
<Grid>
<dxg:GridControl Name="gridControl1" Margin="0,0,0,36" ItemsSource="{Binding ListItem}"
ColumnsSource="{Binding ListColumn}"
>
<dxg:GridControl.ColumnGeneratorTemplate>
<DataTemplate>
<ContentControl>
<dxg:GridColumn FieldName="{Binding FieldName}" Visible="{Binding IsVisible, Mode=TwoWay}"/>
</ContentControl>
</DataTemplate>
</dxg:GridControl.ColumnGeneratorTemplate>
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Name" />
<dxg:GridColumn FieldName="Date" />
<dxg:GridColumn FieldName="IsFired" Visible="{Binding ShowHideIsFiredColumn, Mode=TwoWay}" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView x:Name="view" />
</dxg:GridControl.View>
</dxg:GridControl>
<Button Height="23" HorizontalAlignment="Right" Margin="0,252,223,0" Name="button1" VerticalAlignment="Top" Width="155" Click="button1_Click" Content="Show/Hide IsFired column"></Button>
</Grid>
</Window>