File tree Expand file tree Collapse file tree 4 files changed +6
-36
lines changed Expand file tree Collapse file tree 4 files changed +6
-36
lines changed Original file line number Diff line number Diff line change 32
32
SelectedIndex =" 0" />
33
33
</StackPanel >
34
34
35
+ <FrameworkElement x : Name =" DataContextProxy" DataContext =" {Binding}" />
36
+
35
37
<smtx : XamlDisplay UniqueKey =" grids_1" >
36
38
<DataGrid AutoGenerateColumns =" False"
37
39
CanUserAddRows =" False"
38
40
HeadersVisibility =" All"
39
41
ItemsSource =" {Binding Items1}"
40
42
SelectionUnit =" {Binding ElementName=selectionUnitComboBox, Path=SelectedValue}" >
41
- <DataGrid .Resources>
42
- <domain : BindingProxy x : Key =" DataContextProxy" Data =" {Binding}" />
43
- </DataGrid .Resources>
44
-
45
43
<DataGrid .Columns>
46
44
<!-- by default a DataGridCheckBoxColumn will have the MaterialDesignDataGridCheckBoxColumnStyle and MaterialDesignDataGridCheckBoxColumnEditingStyle applied. See DataGridAssist.ApplyMaterialDesignColumnStyles attached property -->
47
45
<DataGridCheckBoxColumn Binding =" {Binding IsSelected, UpdateSourceTrigger=PropertyChanged}" >
48
46
<DataGridCheckBoxColumn .Header>
49
47
<Border Background =" Transparent" >
50
- <CheckBox IsChecked =" {Binding Data .IsAllItems1Selected, Source={StaticResource DataContextProxy}}" />
48
+ <CheckBox IsChecked =" {Binding DataContext .IsAllItems1Selected, Source={x:Reference DataContextProxy}}" />
51
49
</Border >
52
50
</DataGridCheckBoxColumn .Header>
53
51
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
22
<StackPanel >
23
23
<TextBlock Style =" {StaticResource MaterialDesignHeadline5TextBlock}" Text =" Custom Columns" />
24
24
25
+ <FrameworkElement x : Name =" DataContextProxy" DataContext =" {Binding}" />
26
+
25
27
<smtx : XamlDisplay UniqueKey =" grids_1" >
26
28
<DataGrid AutoGenerateColumns =" False"
27
29
CanUserAddRows =" False"
28
30
HeadersVisibility =" All"
29
31
ItemsSource =" {Binding Items1}" >
30
- <DataGrid .Resources>
31
- <domain : BindingProxy x : Key =" DataContextProxy" Data =" {Binding}" />
32
- </DataGrid .Resources>
33
-
34
32
<DataGrid .Columns>
35
33
<DataGridCheckBoxColumn Binding =" {Binding IsSelected, UpdateSourceTrigger=PropertyChanged}"
36
34
EditingElementStyle =" {StaticResource MaterialDesignDataGridCheckBoxColumnEditingStyle}"
37
35
ElementStyle =" {StaticResource MaterialDesignDataGridCheckBoxColumnStyle}" >
38
36
<DataGridCheckBoxColumn .Header>
39
37
<Border Background =" Transparent" >
40
- <CheckBox IsChecked =" {Binding Data .IsAllItems1Selected, Source={StaticResource DataContextProxy}}" />
38
+ <CheckBox IsChecked =" {Binding DataContext .IsAllItems1Selected, Source={x:Reference DataContextProxy}}" />
41
39
</Border >
42
40
</DataGridCheckBoxColumn .Header>
43
41
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments