File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
MaterialDesignThemes.Wpf/Themes Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 14
14
</ResourceDictionary >
15
15
</UserControl .Resources>
16
16
<Grid Margin =" 8" >
17
+ <Grid .RowDefinitions>
18
+ <RowDefinition />
19
+ <RowDefinition Height =" Auto" />
20
+ </Grid .RowDefinitions>
17
21
<Grid .ColumnDefinitions>
18
22
<ColumnDefinition Width =" 1*" />
19
23
<ColumnDefinition Width =" 1*" />
20
24
<ColumnDefinition Width =" 1*" />
21
25
</Grid .ColumnDefinitions>
22
- <ListBox Grid.Column=" 0" >
26
+ <ListBox Grid.Column=" 0" IsEnabled = " {Binding IsChecked, ElementName=EnableListBox} " >
23
27
<TextBlock >Plain</TextBlock >
24
28
<TextBlock >Old</TextBlock >
25
29
<TextBlock >ListBox</TextBlock >
26
30
<TextBlock >Full of junk</TextBlock >
27
31
</ListBox >
32
+ <CheckBox Name =" EnableListBox" Grid.Row=" 1" IsChecked =" True" >Enabled</CheckBox >
28
33
<!-- piece together your own items control to create some nice stuff that will make everyone think you are cool. and rightly so, because you are cool. you might even be a hipster for all I know -->
29
34
<ItemsControl Grid.Column=" 1" ItemsSource =" {Binding Items1}"
30
35
Grid.IsSharedSizeScope=" True"
Original file line number Diff line number Diff line change 133
133
<Trigger Property =" IsSelected" Value =" True" >
134
134
<Setter TargetName =" Ripple" Property =" Opacity" Value =" .92" />
135
135
</Trigger >
136
+ <Trigger Property =" IsEnabled" Value =" False" >
137
+ <Setter Property =" Opacity" Value =" .56" />
138
+ </Trigger >
136
139
</ControlTemplate .Triggers>
137
140
</ControlTemplate >
138
141
</Setter .Value>
270
273
Padding =" {TemplateBinding Padding}" />
271
274
</Grid >
272
275
</Border >
276
+ <ControlTemplate .Triggers>
277
+ <Trigger Property =" IsEnabled" Value =" False" >
278
+ <Setter Property =" Opacity" Value =" .56" />
279
+ </Trigger >
280
+ </ControlTemplate .Triggers>
273
281
</ControlTemplate >
274
282
</Setter .Value>
275
283
</Setter >
You can’t perform that action at this time.
0 commit comments