|
|
|
@ -8,13 +8,19 @@ |
|
|
|
<!-- =============================================================================== --> |
|
|
|
<!-- Common Converters --> |
|
|
|
<!-- =============================================================================== --> |
|
|
|
|
|
|
|
|
|
|
|
<coreConverters:InverseBoolConverter x:Key="InverseBoolConverter" /> |
|
|
|
|
|
|
|
<!-- =============================================================================== --> |
|
|
|
<!-- Common Styles --> |
|
|
|
<!-- =============================================================================== --> |
|
|
|
|
|
|
|
<SolidColorBrush x:Key="ButtonHover" Color="#C2E0FF"/> |
|
|
|
<SolidColorBrush x:Key="ButtonHoverBorder" Color="#3399FF"/> |
|
|
|
<SolidColorBrush x:Key="ButtonChecked" Color="#E6F0FA"/> |
|
|
|
<SolidColorBrush x:Key="ButtonPressed" Color="#99CCFF"/> |
|
|
|
<SolidColorBrush x:Key="ButtonPressedBorder" Color="#3399FF"/> |
|
|
|
|
|
|
|
<LinearGradientBrush x:Key="WindowDarkBrush" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
|
|
<GradientStop Color="#FFA3AEB9" Offset="0"/> |
|
|
|
<GradientStop Color="#FF8399A9" Offset="0.375"/> |
|
|
|
@ -582,71 +588,6 @@ |
|
|
|
<GradientStop Color="#FF617584" Offset="1"/> |
|
|
|
</LinearGradientBrush> |
|
|
|
|
|
|
|
<Style x:Key="ColorPickerToggleButton" TargetType="ToggleButton"> |
|
|
|
<Setter Property="Foreground" Value="#FF000000"/> |
|
|
|
<Setter Property="Padding" Value="5"/> |
|
|
|
<Setter Property="BorderThickness" Value="1,0,0,0"/> |
|
|
|
<Setter Property="Template"> |
|
|
|
<Setter.Value> |
|
|
|
<ControlTemplate TargetType="ToggleButton"> |
|
|
|
<Grid> |
|
|
|
<VisualStateManager.VisualStateGroups> |
|
|
|
<VisualStateGroup x:Name="CommonStates"> |
|
|
|
<VisualState x:Name="Normal"/> |
|
|
|
<VisualState x:Name="MouseOver"> |
|
|
|
<Storyboard> |
|
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="_backgroundHighlight" Storyboard.TargetProperty="Opacity"> |
|
|
|
<SplineDoubleKeyFrame KeyTime="0" Value="1"/> |
|
|
|
</DoubleAnimationUsingKeyFrames> |
|
|
|
<ColorAnimationUsingKeyFrames Storyboard.TargetName="_backgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)"> |
|
|
|
<SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/> |
|
|
|
</ColorAnimationUsingKeyFrames> |
|
|
|
<ColorAnimationUsingKeyFrames Storyboard.TargetName="_backgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)"> |
|
|
|
<SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/> |
|
|
|
</ColorAnimationUsingKeyFrames> |
|
|
|
<ColorAnimationUsingKeyFrames Storyboard.TargetName="_backgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)"> |
|
|
|
<SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/> |
|
|
|
</ColorAnimationUsingKeyFrames> |
|
|
|
</Storyboard> |
|
|
|
</VisualState> |
|
|
|
</VisualStateGroup> |
|
|
|
</VisualStateManager.VisualStateGroups> |
|
|
|
|
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="*"/> |
|
|
|
<ColumnDefinition Width="1"/> |
|
|
|
<ColumnDefinition Width="Auto"/> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
<Border x:Name="Background" Background="White" BorderThickness="0" Grid.ColumnSpan="3" Cursor="Hand"> |
|
|
|
<Grid Margin="1" Background="#FF1F3B53"> |
|
|
|
<Border x:Name="_backgroundHighlight" Opacity="0" Background="#FF448DCA"/> |
|
|
|
<Rectangle x:Name="_backgroundGradient"> |
|
|
|
<Rectangle.Fill> |
|
|
|
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> |
|
|
|
<GradientStop Color="#F3F3F3" Offset="0"/> |
|
|
|
<GradientStop Color="#EBEBEB" Offset="0.5"/> |
|
|
|
<GradientStop Color="#DDDDDD" Offset="0.5"/> |
|
|
|
<GradientStop Color="#CDCDCD" Offset="1"/> |
|
|
|
</LinearGradientBrush> |
|
|
|
</Rectangle.Fill> |
|
|
|
</Rectangle> |
|
|
|
</Grid> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<Border Margin="5" BorderBrush="{StaticResource ColorPickerDarkBorderBrush}" BorderThickness="1" CornerRadius="3"> |
|
|
|
<Rectangle Fill="{TemplateBinding Background}" /> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<Border Grid.Column="1" Background="#FFC9CACA" BorderBrush="White" BorderThickness="1,0,0,0" Margin="0,2"/> |
|
|
|
|
|
|
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Grid.Column="2"/> |
|
|
|
</Grid> |
|
|
|
</ControlTemplate> |
|
|
|
</Setter.Value> |
|
|
|
</Setter> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<LinearGradientBrush x:Key="PopupBackgroundBrush" StartPoint="0,0" EndPoint="0,1"> |
|
|
|
<LinearGradientBrush.GradientStops> |
|
|
|
<GradientStopCollection> |
|
|
|
@ -694,30 +635,79 @@ |
|
|
|
</Grid> |
|
|
|
</DataTemplate> |
|
|
|
|
|
|
|
<Style x:Key="ColorPickerToggleButtonStyle" TargetType="ToggleButton"> |
|
|
|
<Setter Property="Template"> |
|
|
|
<Setter.Value> |
|
|
|
<ControlTemplate TargetType="ToggleButton"> |
|
|
|
<Border Background="{TemplateBinding Background}" CornerRadius="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true"> |
|
|
|
<Grid> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="*"/> |
|
|
|
<ColumnDefinition Width="Auto"/> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> |
|
|
|
<Grid x:Name="arrowGlyph" IsHitTestVisible="False" Grid.Column="1" Margin="5"> |
|
|
|
<Path Width="7" Height="4" Data="M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z" Fill="#FF000000"/> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
</Border> |
|
|
|
<ControlTemplate.Triggers> |
|
|
|
<Trigger Property="IsChecked" Value="true"> |
|
|
|
<Setter Property="BorderBrush" Value="{StaticResource ButtonHoverBorder}"/> |
|
|
|
<Setter Property="Background" Value="{StaticResource ButtonChecked}"/> |
|
|
|
</Trigger> |
|
|
|
<Trigger Property="IsMouseOver" Value="true"> |
|
|
|
<Setter Property="BorderBrush" Value="{StaticResource ButtonHoverBorder}"/> |
|
|
|
<Setter Property="Background" Value="{StaticResource ButtonHover}"/> |
|
|
|
</Trigger> |
|
|
|
<Trigger Property="IsKeyboardFocused" Value="true"> |
|
|
|
<Setter Property="BorderBrush" Value="{StaticResource ButtonHoverBorder}"/> |
|
|
|
<Setter Property="Background" Value="{StaticResource ButtonHover}"/> |
|
|
|
</Trigger> |
|
|
|
<MultiTrigger> |
|
|
|
<MultiTrigger.Conditions> |
|
|
|
<Condition Property="IsMouseOver" Value="true"/> |
|
|
|
<Condition Property="IsChecked" Value="true"/> |
|
|
|
</MultiTrigger.Conditions> |
|
|
|
<Setter Property="BorderBrush" Value="{StaticResource ButtonPressedBorder}"/> |
|
|
|
<Setter Property="Background" Value="{StaticResource ButtonPressed}"/> |
|
|
|
</MultiTrigger> |
|
|
|
<MultiTrigger> |
|
|
|
<MultiTrigger.Conditions> |
|
|
|
<Condition Property="IsKeyboardFocused" Value="true"/> |
|
|
|
<Condition Property="IsChecked" Value="true"/> |
|
|
|
</MultiTrigger.Conditions> |
|
|
|
<Setter Property="BorderBrush" Value="{StaticResource ButtonPressedBorder}"/> |
|
|
|
<Setter Property="Background" Value="{StaticResource ButtonPressed}"/> |
|
|
|
</MultiTrigger> |
|
|
|
<Trigger Property="IsPressed" Value="true"> |
|
|
|
<Setter Property="BorderBrush" Value="{StaticResource ButtonPressedBorder}"/> |
|
|
|
<Setter Property="Background" Value="{StaticResource ButtonPressed}"/> |
|
|
|
</Trigger> |
|
|
|
</ControlTemplate.Triggers> |
|
|
|
</ControlTemplate> |
|
|
|
</Setter.Value> |
|
|
|
</Setter> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style TargetType="{x:Type local:ColorPicker}"> |
|
|
|
<Setter Property="ButtonStyle" Value="{StaticResource ColorPickerToggleButton}" /> |
|
|
|
<Setter Property="BorderBrush" Value="{StaticResource ColorPickerDarkBorderBrush}" /> |
|
|
|
<Setter Property="BorderThickness" Value="1" /> |
|
|
|
<Setter Property="ButtonStyle" Value="{StaticResource ColorPickerToggleButtonStyle}" /> |
|
|
|
<Setter Property="Focusable" Value="False" /> |
|
|
|
<Setter Property="Template"> |
|
|
|
<Setter.Value> |
|
|
|
<ControlTemplate TargetType="{x:Type local:ColorPicker}"> |
|
|
|
<Grid> |
|
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0"> |
|
|
|
<Grid> |
|
|
|
<ToggleButton x:Name="PART_ColorPickerToggleButton" Style="{TemplateBinding ButtonStyle}" MinHeight="22"> |
|
|
|
<ToggleButton.Background> |
|
|
|
<SolidColorBrush Color="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}"/> |
|
|
|
</ToggleButton.Background> |
|
|
|
<ToggleButton.Content> |
|
|
|
<Grid x:Name="arrowGlyph" IsHitTestVisible="False"> |
|
|
|
<Path Width="7" Height="4" Data="M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z" Fill="#FF000000"/> |
|
|
|
</Grid> |
|
|
|
</ToggleButton.Content> |
|
|
|
</ToggleButton> |
|
|
|
</Grid> |
|
|
|
</Border> |
|
|
|
<ToggleButton x:Name="PART_ColorPickerToggleButton" Style="{TemplateBinding ButtonStyle}" MinHeight="22" ClickMode="Press" IsChecked="{Binding IsOpen, RelativeSource={RelativeSource TemplatedParent}}" > |
|
|
|
<Border> |
|
|
|
<Border.Background> |
|
|
|
<SolidColorBrush Color="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}"/> |
|
|
|
</Border.Background> |
|
|
|
</Border> |
|
|
|
</ToggleButton> |
|
|
|
|
|
|
|
<Popup x:Name="PART_ColorPickerPalettePopup" VerticalAlignment="Bottom" IsOpen="False" > |
|
|
|
<Popup x:Name="PART_ColorPickerPalettePopup" VerticalAlignment="Bottom" IsOpen="{Binding ElementName=PART_ColorPickerToggleButton, Path=IsChecked}" > |
|
|
|
<Border BorderThickness="1" Background="{StaticResource PopupBackgroundBrush}" BorderBrush="{StaticResource ColorPickerDarkBorderBrush}" Padding="3"> |
|
|
|
<Grid Margin="4"> |
|
|
|
<Grid.RowDefinitions> |
|
|
|
@ -988,7 +978,7 @@ |
|
|
|
<!-- =============================================================================== --> |
|
|
|
<!-- DateTimeUpDown --> |
|
|
|
<!-- =============================================================================== --> |
|
|
|
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type local:DateTimeUpDown}"> |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/> |
|
|
|
<Setter Property="Focusable" Value="False" /> |
|
|
|
|