Colorpicker fixes (#9277)

Co-authored-by: Niels Laute <niels9001@hotmail.com>
This commit is contained in:
Niels Laute
2021-01-25 14:21:49 +01:00
committed by GitHub
parent 5713230c6d
commit 2e961d1d70
3 changed files with 4 additions and 8 deletions

View File

@@ -274,14 +274,14 @@
<Button x:Name="CancelButton"
Click="CancelButton_Click"
AutomationProperties.Name="{x:Static p:Resources.Cancel}"
Content="Cancel"
Content="{x:Static p:Resources.Cancel}"
Width="80"/>
<Button Margin="12,0,12,0"
x:Name="OKButton"
Click="OKButton_Click"
Style="{StaticResource AccentButtonStyle}"
AutomationProperties.Name="{x:Static p:Resources.OK}"
Content="OK"
Content="{x:Static p:Resources.OK}"
Width="80"/>
</WrapPanel>
</StackPanel>

View File

@@ -199,6 +199,7 @@ namespace ColorPicker.Controls
CurrentColorButton.BeginAnimation(Button.MarginProperty, moveColor);
detailsStackPanel.BeginAnimation(StackPanel.OpacityProperty, opacityAppear);
detailsGrid.BeginAnimation(Grid.HeightProperty, resize);
CurrentColorButton.IsEnabled = false;
}
}
@@ -226,6 +227,7 @@ namespace ColorPicker.Controls
detailsStackPanel.BeginAnimation(Window.OpacityProperty, opacityAppear);
detailsGrid.BeginAnimation(Grid.HeightProperty, resize);
detailsGrid.Visibility = Visibility.Collapsed;
CurrentColorButton.IsEnabled = true;
}
}

View File

@@ -120,15 +120,9 @@
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ButtonBorderBrushPressed}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ButtonForegroundPressed}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ButtonBackgroundDisabled}" />
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ButtonBorderBrushDisabled}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>