This repository has been archived by the owner on Oct 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
43 lines (38 loc) · 2.07 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
40
41
42
43
<Window Height="270"
mc:Ignorable="d"
Title="MainWindow"
Width="532"
x:Class="WPFDataGridApp15.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:my="clr-namespace:WPFDataGridApp15"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Button Content="Collapse All" Name="collapseAllButton" Command="{Binding CollapseAllCommand}" />
<dxg:GridControl Grid.Row="1" my:MasterDetailMVVMHelper.ExpandedMasterRowsSource="{Binding ExpandedItems}" Name="gridControl1" ItemsSource="{Binding Data}" DesignTimeDataObjectType="my:DataClass" DesignTimeDataSourceRowCount="3" >
<dxg:GridControl.DetailDescriptor>
<dxg:DataControlDetailDescriptor ItemsSourceBinding="{Binding ChildData}">
<dxg:GridControl MaxHeight="300" AutoGenerateColumns="AddNew">
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True" ShowGroupPanel="False" />
</dxg:GridControl.View>
</dxg:GridControl>
</dxg:DataControlDetailDescriptor>
</dxg:GridControl.DetailDescriptor>
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="IntValue" Name="gridColumn1" />
<dxg:GridColumn FieldName="Text" Name="gridColumn2" />
<dxg:GridColumn FieldName="DateValue" Name="gridColumn3" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView Name="tableView1" AutoWidth="True" />
</dxg:GridControl.View>
</dxg:GridControl>
</Grid>
</Window>