File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 4
4
xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
5
5
xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
6
6
xmlns : materialDesign =" http://materialdesigninxaml.net/winfx/xaml/themes"
7
+ xmlns : codeDisplayer =" clr-namespace:CodeDisplayer;assembly=CodeDisplayer"
7
8
mc : Ignorable =" d"
8
9
d : DesignHeight =" 300" d : DesignWidth =" 300" >
9
10
<UserControl .Resources>
14
15
</ResourceDictionary >
15
16
</UserControl .Resources>
16
17
<ScrollViewer >
17
- <StackPanel >
18
- <TextBlock >Custom Columns</TextBlock >
18
+ <codeDisplayer : XamlDisplayerPanel x : Name = " XamlDisplayerPanel " >
19
+ <TextBlock Style = " {StaticResource MaterialDesignTitleTextBlock} " >Custom Columns</TextBlock >
19
20
<DataGrid Margin =" 0 8 0 0" ItemsSource =" {Binding Items3}" CanUserSortColumns =" True" CanUserAddRows =" False" AutoGenerateColumns =" False"
20
21
materialDesign:DataGridAssist.CellPadding=" 13 8 8 8" materialDesign:DataGridAssist.ColumnHeaderPadding=" 8" >
21
22
<DataGrid .Columns>
66
67
ItemsSourceBinding =" {Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGrid}}, Path=DataContext.Foods}" />
67
68
</DataGrid .Columns>
68
69
</DataGrid >
69
- <TextBlock Margin =" 0 24 0 0" >Auto Generated Columns</TextBlock >
70
+ <TextBlock Style = " {StaticResource MaterialDesignTitleTextBlock} " Margin =" 0 24 0 0" >Auto Generated Columns</TextBlock >
70
71
<DataGrid Margin =" 0 8 0 0" ItemsSource =" {Binding Items3}" CanUserSortColumns =" True" CanUserAddRows =" False" />
71
- <TextBlock Margin =" 0 24 0 0" >Custom Padding</TextBlock >
72
+ <TextBlock Style = " {StaticResource MaterialDesignTitleTextBlock} " Margin =" 0 24 0 0" >Custom Padding</TextBlock >
72
73
<DataGrid Margin =" 0 8 0 0" ItemsSource =" {Binding Items3}" CanUserSortColumns =" True" CanUserAddRows =" False"
73
74
materialDesign:DataGridAssist.CellPadding=" 4 2 2 2" materialDesign:DataGridAssist.ColumnHeaderPadding=" 4 2 2 2"
74
75
/>
75
- </StackPanel >
76
+ </codeDisplayer : XamlDisplayerPanel >
76
77
</ScrollViewer >
77
78
</UserControl >
Original file line number Diff line number Diff line change 12
12
using System . Windows . Media . Imaging ;
13
13
using System . Windows . Navigation ;
14
14
using System . Windows . Shapes ;
15
+ using CodeDisplayer ;
16
+ using MaterialDesignDemo . Helper ;
15
17
16
18
namespace MaterialDesignColors . WpfExample
17
19
{
@@ -23,6 +25,7 @@ public partial class Grids : UserControl
23
25
public Grids ( )
24
26
{
25
27
InitializeComponent ( ) ;
28
+ XamlDisplayerPanel . Initialize ( new SourceRouter ( this . GetType ( ) . Name ) . GetSource ( ) ) ;
26
29
}
27
30
}
28
31
}
You can’t perform that action at this time.
0 commit comments