|
24 | 24 | <materialDesign:NullableToVisibilityConverter x:Key="NullableToVisibilityConverter" />
|
25 | 25 | <converters:StringJoinConverter x:Key="StringJoinConverter" Separator="{x:Static system:Environment.NewLine}" />
|
26 | 26 | <converters:ColorToBrushConverter x:Key="ColorToBrushConverter" />
|
| 27 | + <converters:IsTransparentConverter x:Key="IsTransparentConverter" /> |
27 | 28 | </ResourceDictionary>
|
28 | 29 | </UserControl.Resources>
|
29 | 30 |
|
|
191 | 192 | </StackPanel>
|
192 | 193 | </Grid>
|
193 | 194 |
|
194 |
| - <materialDesign:ColorPicker MinHeight="100" Margin="0,10"> |
| 195 | + <materialDesign:ColorPicker MinHeight="100" Margin="0,10" |
| 196 | + IsEnabled="{Binding IsChecked, ElementName=UseTransparent, Converter={StaticResource InvertBooleanConverter}}"> |
195 | 197 | <materialDesign:ColorPicker.Style>
|
196 | 198 | <Style TargetType="materialDesign:ColorPicker" BasedOn="{StaticResource {x:Type materialDesign:ColorPicker}}">
|
197 | 199 | <Setter Property="Color" Value="{Binding GeneratedIconBackground, Delay=25}" />
|
198 | 200 | <Style.Triggers>
|
199 | 201 | <DataTrigger Binding="{Binding IsChecked, ElementName=IconForeground}" Value="True">
|
200 | 202 | <Setter Property="Color" Value="{Binding GeneratedIconForeground, Delay=25}" />
|
201 | 203 | </DataTrigger>
|
| 204 | + <Trigger Property="IsEnabled" Value="False"> |
| 205 | + <Setter Property="Opacity" Value="0.4" /> |
| 206 | + </Trigger> |
202 | 207 | </Style.Triggers>
|
203 | 208 | </Style>
|
204 | 209 | </materialDesign:ColorPicker.Style>
|
205 | 210 | </materialDesign:ColorPicker>
|
206 | 211 |
|
207 |
| - <Button HorizontalAlignment="Right" |
208 |
| - Command="{Binding SaveIconCommand}" |
209 |
| - Content="_Save" /> |
| 212 | + <Grid> |
| 213 | + <Grid.ColumnDefinitions> |
| 214 | + <ColumnDefinition /> |
| 215 | + <ColumnDefinition Width="Auto" /> |
| 216 | + </Grid.ColumnDefinitions> |
| 217 | + <CheckBox Content="Use Transparent" x:Name="UseTransparent"> |
| 218 | + <CheckBox.Style> |
| 219 | + <Style TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}"> |
| 220 | + <Setter Property="IsChecked" Value="{Binding GeneratedIconBackground, Converter={StaticResource IsTransparentConverter}}" /> |
| 221 | + <Style.Triggers> |
| 222 | + <DataTrigger Binding="{Binding IsChecked, ElementName=IconForeground}" Value="True"> |
| 223 | + <Setter Property="IsChecked" Value="{Binding GeneratedIconForeground, Converter={StaticResource IsTransparentConverter}}" /> |
| 224 | + </DataTrigger> |
| 225 | + </Style.Triggers> |
| 226 | + </Style> |
| 227 | + </CheckBox.Style> |
| 228 | + </CheckBox> |
| 229 | + <Button HorizontalAlignment="Right" |
| 230 | + Command="{Binding SaveIconCommand}" |
| 231 | + Content="_Save" /> |
| 232 | + </Grid> |
| 233 | + |
210 | 234 | </StackPanel>
|
211 | 235 | </materialDesign:PopupBox>
|
212 | 236 | </StackPanel>
|
|
0 commit comments