10 changed files with 202 additions and 1238 deletions
@ -1,142 +0,0 @@ |
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
xmlns:local="clr-namespace:Microsoft.Windows.Controls"> |
|||
|
|||
<!-- =============================================================================== --> |
|||
<!-- BusyIndicator --> |
|||
<!-- =============================================================================== --> |
|||
<Style TargetType="{x:Type local:BusyIndicator}"> |
|||
<Setter Property="BusyContent" Value="Please wait..."/> |
|||
<Setter Property="IsTabStop" Value="False"/> |
|||
<Setter Property="OverlayStyle"> |
|||
<Setter.Value> |
|||
<Style TargetType="Rectangle"> |
|||
<Setter Property="Fill" Value="White"/> |
|||
<Setter Property="Opacity" Value="0.5"/> |
|||
</Style> |
|||
</Setter.Value> |
|||
</Setter> |
|||
<Setter Property="ProgressBarStyle"> |
|||
<Setter.Value> |
|||
<Style TargetType="ProgressBar"> |
|||
<Setter Property="IsIndeterminate" Value="True"/> |
|||
<Setter Property="Height" Value="15"/> |
|||
<Setter Property="Margin" Value="8,0,8,8"/> |
|||
</Style> |
|||
</Setter.Value> |
|||
</Setter> |
|||
<Setter Property="DisplayAfter" Value="00:00:00.1"/> |
|||
<Setter Property="HorizontalAlignment" Value="Stretch"/> |
|||
<Setter Property="VerticalAlignment" Value="Stretch"/> |
|||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/> |
|||
<Setter Property="VerticalContentAlignment" Value="Stretch"/> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type local:BusyIndicator}"> |
|||
<Grid> |
|||
<VisualStateManager.VisualStateGroups> |
|||
<VisualStateGroup x:Name="VisibilityStates"> |
|||
<VisualState x:Name="Hidden"> |
|||
<Storyboard> |
|||
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetName="busycontent" Storyboard.TargetProperty="(UIElement.Visibility)"> |
|||
<DiscreteObjectKeyFrame KeyTime="00:00:00"> |
|||
<DiscreteObjectKeyFrame.Value> |
|||
<Visibility>Collapsed</Visibility> |
|||
</DiscreteObjectKeyFrame.Value> |
|||
</DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetName="overlay" Storyboard.TargetProperty="(UIElement.Visibility)"> |
|||
<DiscreteObjectKeyFrame KeyTime="00:00:00"> |
|||
<DiscreteObjectKeyFrame.Value> |
|||
<Visibility>Collapsed</Visibility> |
|||
</DiscreteObjectKeyFrame.Value> |
|||
</DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
</Storyboard> |
|||
</VisualState> |
|||
<VisualState x:Name="Visible"> |
|||
<Storyboard> |
|||
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetName="busycontent" Storyboard.TargetProperty="(UIElement.Visibility)"> |
|||
<DiscreteObjectKeyFrame KeyTime="00:00:00"> |
|||
<DiscreteObjectKeyFrame.Value> |
|||
<Visibility>Visible</Visibility> |
|||
</DiscreteObjectKeyFrame.Value> |
|||
</DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetName="overlay" Storyboard.TargetProperty="(UIElement.Visibility)"> |
|||
<DiscreteObjectKeyFrame KeyTime="00:00:00"> |
|||
<DiscreteObjectKeyFrame.Value> |
|||
<Visibility>Visible</Visibility> |
|||
</DiscreteObjectKeyFrame.Value> |
|||
</DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
</Storyboard> |
|||
</VisualState> |
|||
</VisualStateGroup> |
|||
<VisualStateGroup x:Name="BusyStatusStates"> |
|||
<VisualState x:Name="Idle"> |
|||
<Storyboard> |
|||
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetName="content" Storyboard.TargetProperty="(Control.IsEnabled)"> |
|||
<DiscreteObjectKeyFrame KeyTime="00:00:00"> |
|||
<DiscreteObjectKeyFrame.Value> |
|||
<sys:Boolean>True</sys:Boolean> |
|||
</DiscreteObjectKeyFrame.Value> |
|||
</DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
</Storyboard> |
|||
</VisualState> |
|||
<VisualState x:Name="Busy"> |
|||
<Storyboard> |
|||
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetName="content" Storyboard.TargetProperty="(Control.IsEnabled)"> |
|||
<DiscreteObjectKeyFrame KeyTime="00:00:00"> |
|||
<DiscreteObjectKeyFrame.Value> |
|||
<sys:Boolean>False</sys:Boolean> |
|||
</DiscreteObjectKeyFrame.Value> |
|||
</DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
</Storyboard> |
|||
</VisualState> |
|||
</VisualStateGroup> |
|||
</VisualStateManager.VisualStateGroups> |
|||
<ContentControl x:Name="content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/> |
|||
<Rectangle x:Name="overlay" Style="{TemplateBinding OverlayStyle}"/> |
|||
<ContentPresenter x:Name="busycontent"> |
|||
<ContentPresenter.Content> |
|||
<Grid HorizontalAlignment="Center" VerticalAlignment="Center"> |
|||
<Border Background="White" BorderThickness="1" CornerRadius="2"> |
|||
<Border.BorderBrush> |
|||
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> |
|||
<GradientStop Color="#FFA3AEB9" Offset="0"/> |
|||
<GradientStop Color="#FF8399A9" Offset="0.375"/> |
|||
<GradientStop Color="#FF718597" Offset="0.375"/> |
|||
<GradientStop Color="#FF617584" Offset="1"/> |
|||
</LinearGradientBrush> |
|||
</Border.BorderBrush> |
|||
<Border CornerRadius="1.5" Margin="1"> |
|||
<Border.Background> |
|||
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> |
|||
<GradientStop Color="#FFF6F8F9" Offset="0.02"/> |
|||
<GradientStop Color="#FFB8B8B8" Offset="0.996"/> |
|||
</LinearGradientBrush> |
|||
</Border.Background> |
|||
<Grid MinWidth="150"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="Auto"/> |
|||
</Grid.RowDefinitions> |
|||
<ContentPresenter Content="{TemplateBinding BusyContent}" ContentTemplate="{TemplateBinding BusyContentTemplate}" Margin="8"/> |
|||
<ProgressBar Grid.Row="1" Style="{TemplateBinding ProgressBarStyle}"/> |
|||
</Grid> |
|||
</Border> |
|||
</Border> |
|||
</Grid> |
|||
</ContentPresenter.Content> |
|||
</ContentPresenter> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
</ResourceDictionary> |
|||
@ -1,196 +0,0 @@ |
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Microsoft.Windows.Controls"> |
|||
|
|||
<!-- =============================================================================== --> |
|||
<!-- ChildWindow --> |
|||
<!-- =============================================================================== --> |
|||
|
|||
<SolidColorBrush x:Key="ChildWindowMainBrushColor" Color="#FF3C688D"/> |
|||
<LinearGradientBrush x:Key="BorderBrush" EndPoint="0.5,1" StartPoint="0.5,0"> |
|||
<GradientStop Color="#7FFFFFFF" Offset="0.05"/> |
|||
<GradientStop Color="#B2FFFFFF" Offset="0.07"/> |
|||
<GradientStop Color="#00FFFFFF" Offset="1"/> |
|||
</LinearGradientBrush> |
|||
|
|||
<LinearGradientBrush x:Key="ChildWindowDarkBrush" EndPoint="0.5,1" StartPoint="0.5,0"> |
|||
<GradientStop Color="#FFA3AEB9" Offset="0"/> |
|||
<GradientStop Color="#FF8399A9" Offset="0.375"/> |
|||
<GradientStop Color="#FF718597" Offset="0.375"/> |
|||
<GradientStop Color="#FF617584" Offset="1"/> |
|||
</LinearGradientBrush> |
|||
|
|||
<LinearGradientBrush x:Key="ChildWindowBackgroundBrush" StartPoint="0,0" EndPoint="0,1"> |
|||
<LinearGradientBrush.GradientStops> |
|||
<GradientStopCollection> |
|||
<GradientStop Offset="0" Color="#FFffffff"/> |
|||
<GradientStop Offset="0.479" Color="#FFf4f5f6"/> |
|||
<GradientStop Offset="1" Color="#FFd0d6db"/> |
|||
</GradientStopCollection> |
|||
</LinearGradientBrush.GradientStops> |
|||
</LinearGradientBrush> |
|||
|
|||
<LinearGradientBrush x:Key="ChildWindowButtonHoverBrush" StartPoint="0,0" EndPoint="0,1"> |
|||
<LinearGradientBrush.GradientStops> |
|||
<GradientStopCollection> |
|||
<GradientStop Offset="0" Color="#FFb5bdc8"/> |
|||
<GradientStop Offset="0.370" Color="#FF8399a9"/> |
|||
<GradientStop Offset="0.370" Color="#FF718597"/> |
|||
<GradientStop Offset="0.906" Color="#FFb9c1ca"/> |
|||
<GradientStop Offset="1" Color="#FFb9c1ca"/> |
|||
</GradientStopCollection> |
|||
</LinearGradientBrush.GradientStops> |
|||
</LinearGradientBrush> |
|||
|
|||
<LinearGradientBrush x:Key="ChildWindowButtonPressedBrush" StartPoint="0,0" EndPoint="0,1"> |
|||
<LinearGradientBrush.GradientStops> |
|||
<GradientStopCollection> |
|||
<GradientStop Offset="0" Color="#FF6b7c8d"/> |
|||
<GradientStop Offset="0.370" Color="#FF4d606f"/> |
|||
<GradientStop Offset="0.370" Color="#FF465460"/> |
|||
<GradientStop Offset="0.906" Color="#FF262d33"/> |
|||
<GradientStop Offset="1" Color="#FF262d33"/> |
|||
</GradientStopCollection> |
|||
</LinearGradientBrush.GradientStops> |
|||
</LinearGradientBrush> |
|||
|
|||
<Style x:Key="ChildWindowCloseButtonStyle" TargetType="Button"> |
|||
<Setter Property="Foreground" Value="#FF000000"/> |
|||
<Setter Property="Padding" Value="3"/> |
|||
<Setter Property="BorderThickness" Value="1"/> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="Button"> |
|||
<Grid> |
|||
<VisualStateManager.VisualStateGroups> |
|||
<VisualStateGroup x:Name="CommonStates"> |
|||
<VisualState x:Name="Normal"/> |
|||
<VisualState x:Name="MouseOver"> |
|||
<Storyboard> |
|||
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background)"> |
|||
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ChildWindowButtonHoverBrush}"></DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
</Storyboard> |
|||
</VisualState> |
|||
<VisualState x:Name="Pressed"> |
|||
<Storyboard> |
|||
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background)"> |
|||
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource ChildWindowButtonPressedBrush}"></DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
</Storyboard> |
|||
</VisualState> |
|||
</VisualStateGroup> |
|||
</VisualStateManager.VisualStateGroups> |
|||
<Border x:Name="Background" CornerRadius="0,0,2,0" Background="{StaticResource ChildWindowDarkBrush}"> |
|||
<Border Margin="1,0,1,1" BorderBrush="#59FFFFFF" BorderThickness="1" CornerRadius="0,0,1,0"/> |
|||
</Border> |
|||
<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/> |
|||
<Path x:Name="path" |
|||
Height="6" |
|||
Width="7" |
|||
Stretch="Fill" |
|||
Opacity="1" |
|||
Data="M 2,6 C2,6 3,6 3,6 3,6 3,5 3,5 3,5 4,5 4,5 4,5 4,6 4,6 4,6 5,6 5,6 5,6 7,6 7,6 7,6 7,5 7,5 7,5 6,5 6,5 6,5 6,4 6,4 6,4 5,4 5,4 5,4 5,2 5,2 5,2 6,2 6,2 6,2 6,1 6,1 6,1 7,1 7,1 7,1 7,0 7,0 7,0 5,0 5,0 5,0 4,0 4,0 4,0 4,1 4,1 4,1 3,1 3,1 3,1 3,0 3,0 3,0 2,0 2,0 2,0 0,0 0,0 0,0 0,1 0,1 0,1 1,1 1,1 1,1 1,2 1,2 1,2 2,2 2,2 2,2 2,4 2,4 2,4 1,4 1,4 1,4 1,5 1,5 1,5 0,5 0,5 0,5 0,6 0,6 0,6 2,6 2,6 z" |
|||
Fill="White" Margin="0,0,0,1" Visibility="Collapsed" /> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<Style TargetType="{x:Type local:ChildWindow}"> |
|||
<Setter Property="Background" Value="#FFFFFFFF"/> |
|||
<Setter Property="BorderBrush" Value="{StaticResource ChildWindowDarkBrush}" /> |
|||
<Setter Property="BorderThickness" Value="1" /> |
|||
<Setter Property="CaptionForeground" Value="#FF000000" /> |
|||
<Setter Property="CloseButtonStyle" Value="{StaticResource ChildWindowCloseButtonStyle}" /> |
|||
<Setter Property="HorizontalAlignment" Value="Left" /> |
|||
<Setter Property="HorizontalContentAlignment" Value="Left" /> |
|||
<Setter Property="IsEnabled" Value="true" /> |
|||
<Setter Property="OverlayBrush" Value="#7F000000" /> |
|||
<Setter Property="OverlayOpacity" Value="1" /> |
|||
<Setter Property="VerticalAlignment" Value="Top" /> |
|||
<Setter Property="VerticalContentAlignment" Value="Top" /> |
|||
<Setter Property="WindowBorderBrush" Value="{StaticResource ChildWindowDarkBrush}" /> |
|||
<Setter Property="WindowBackground" Value="{StaticResource ChildWindowBackgroundBrush}" /> |
|||
<Setter Property="WindowOpacity" Value="1.0" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type local:ChildWindow}"> |
|||
<Grid x:Name="Root"> |
|||
<Grid.Resources> |
|||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> |
|||
</Grid.Resources> |
|||
<Grid x:Name="PART_Overlay" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0" RenderTransformOrigin="0.5,0.5" |
|||
Background="{TemplateBinding OverlayBrush}" |
|||
Opacity="{TemplateBinding OverlayOpacity}" |
|||
Visibility="{TemplateBinding IsModal, Converter={StaticResource BooleanToVisibilityConverter}}"/> |
|||
<Grid x:Name="PART_WindowRoot" HorizontalAlignment="Left" VerticalAlignment="Top"> |
|||
<Grid.RenderTransform> |
|||
<TransformGroup> |
|||
<ScaleTransform /> |
|||
<SkewTransform /> |
|||
<RotateTransform /> |
|||
<TranslateTransform /> |
|||
</TransformGroup> |
|||
</Grid.RenderTransform> |
|||
|
|||
<!-- Borders --> |
|||
<Grid x:Name="WindowGrid"> |
|||
<Border BorderBrush="{TemplateBinding WindowBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="5,5,0,0" Opacity="{TemplateBinding WindowOpacity}"/> |
|||
<Grid Margin="0" Background="{x:Null}"> |
|||
<Border x:Name="WindowBorder" Margin="1,1,1,1" Background="{TemplateBinding WindowBackground}" CornerRadius="4,4,0,0" Opacity="{TemplateBinding WindowOpacity}"/> |
|||
<Border BorderBrush="White" BorderThickness="1" CornerRadius="4,4,0,0" Margin="1" Opacity="0.7"/> |
|||
</Grid> |
|||
</Grid> |
|||
|
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" MinHeight="26"/> |
|||
<RowDefinition /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<!-- Content Border --> |
|||
<Grid Margin="6,0,6,6" x:Name="ContentGrid" Grid.Row="1"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderBrush="#FFFFFFFF" BorderThickness="1" CornerRadius="1"/> |
|||
<Border Margin="1" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0.1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"> |
|||
|
|||
<ContentPresenter x:Name="Content" Content="{TemplateBinding Content}" |
|||
ContentTemplate="{TemplateBinding ContentTemplate}" /> |
|||
</Border> |
|||
</Grid> |
|||
|
|||
<!-- Header --> |
|||
<Border x:Name="PART_DragWidget" Background="Transparent" Grid.Column="1" CornerRadius="5,5,0,0" Margin="1,1,1,0"> |
|||
<Grid> |
|||
<Grid x:Name="CaptionHeader" Margin="1,1,105,0" VerticalAlignment="Center"> |
|||
<!-- Caption --> |
|||
<ContentControl x:Name="Caption" Margin="5,0,0,0" IsTabStop="False" HorizontalAlignment="Stretch" |
|||
Content="{TemplateBinding Caption}" |
|||
Foreground="{TemplateBinding CaptionForeground}"/> |
|||
|
|||
</Grid> |
|||
</Grid> |
|||
</Border> |
|||
|
|||
</Grid> |
|||
|
|||
<!-- Buttons --> |
|||
<Border BorderBrush="#A5FFFFFF" BorderThickness="1,0,1,1" CornerRadius="0,0,3,3" VerticalAlignment="Top" Margin="0,1,7,0" HorizontalAlignment="Right"> |
|||
<Button x:Name="PART_CloseButton" Style="{TemplateBinding CloseButtonStyle}" Visibility="{TemplateBinding CloseButtonVisibility}" Height="17" Width="43" IsTabStop="False"> |
|||
<Path Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Width="12" Fill="#E4FFFFFF" Stretch="Fill" Stroke="#FF535666" |
|||
Data="M0.5,0.5 L4.5178828,0.5 L6.0620003,3.125 L7.4936447,0.5 L11.5,0.5 L11.5,1.5476431 L8.7425003,6.1201854 L11.5,10.359666 L11.5,11.5 L7.4941902,11.5 L6.0620003,8.8740005 L4.5172949,11.5 L0.5,11.5 L0.5,10.43379 L3.3059995,6.1201582 L0.5,1.4676378 L0.5,0.5 z"/> |
|||
</Button> |
|||
</Border> |
|||
</Grid> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
</ResourceDictionary> |
|||
@ -0,0 +1,22 @@ |
|||
using System; |
|||
|
|||
namespace Microsoft.Windows.Controls |
|||
{ |
|||
internal static partial class VisualStates |
|||
{ |
|||
/// <summary>
|
|||
/// Window State group name.
|
|||
/// </summary>
|
|||
public const string WindowStatesGroup = "WindowStatesGroup"; |
|||
|
|||
/// <summary>
|
|||
/// Open state name for ChildWindow.
|
|||
/// </summary>
|
|||
public const string Open = "Open"; |
|||
|
|||
/// <summary>
|
|||
/// Closed state name for ChildWindow.
|
|||
/// </summary>
|
|||
public const string Closed = "Closed"; |
|||
} |
|||
} |
|||
@ -1,367 +0,0 @@ |
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Microsoft.Windows.Controls"> |
|||
|
|||
<!-- =============================================================================== --> |
|||
<!-- ColorPicker --> |
|||
<!-- =============================================================================== --> |
|||
|
|||
<LinearGradientBrush x:Key="ColorPickerDarkBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0"> |
|||
<GradientStop Color="#FFA3AEB9" Offset="0"/> |
|||
<GradientStop Color="#FF8399A9" Offset="0.375"/> |
|||
<GradientStop Color="#FF718597" Offset="0.375"/> |
|||
<GradientStop Color="#FF617584" Offset="1"/> |
|||
</LinearGradientBrush> |
|||
|
|||
<DrawingBrush x:Key="CheckerBrush" Viewport="0,0,10,10" ViewportUnits="Absolute" TileMode="Tile"> |
|||
<DrawingBrush.Drawing> |
|||
<DrawingGroup> |
|||
<GeometryDrawing Brush="White"> |
|||
<GeometryDrawing.Geometry> |
|||
<RectangleGeometry Rect="0,0 100,100" /> |
|||
</GeometryDrawing.Geometry> |
|||
</GeometryDrawing> |
|||
<GeometryDrawing Brush="LightGray"> |
|||
<GeometryDrawing.Geometry> |
|||
<GeometryGroup> |
|||
<RectangleGeometry Rect="0,0 50,50" /> |
|||
<RectangleGeometry Rect="50,50 50,50" /> |
|||
</GeometryGroup> |
|||
</GeometryDrawing.Geometry> |
|||
</GeometryDrawing> |
|||
</DrawingGroup> |
|||
</DrawingBrush.Drawing> |
|||
</DrawingBrush> |
|||
|
|||
<Style x:Key="SliderRepeatButtonStyle" |
|||
TargetType="{x:Type RepeatButton}"> |
|||
<Setter Property="OverridesDefaultStyle" Value="true"/> |
|||
<Setter Property="IsTabStop" Value="false"/> |
|||
<Setter Property="Focusable" Value="false"/> |
|||
<Setter Property="Background" Value="Transparent"/> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type RepeatButton}"> |
|||
<Border Background="{TemplateBinding Background}"/> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<Style x:Key="VerticalSlideThumbStyle" TargetType="{x:Type Thumb}"> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type Thumb}"> |
|||
<Canvas x:Name="selector" Height="8" Background="Transparent" IsHitTestVisible="True" > |
|||
<Path Width="5" Height="8" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF000000" Fill="#FF000000" Data="F1 M 276.761,316L 262.619,307.835L 262.619,324.165L 276.761,316 Z " /> |
|||
<Path Width="5" Height="8" Canvas.Top="8" Canvas.Left="20" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF000000" Fill="#FF000000" Data="F1 M 276.761,316L 262.619,307.835L 262.619,324.165L 276.761,316 Z "> |
|||
<Path.RenderTransform> |
|||
<RotateTransform Angle="180"/> |
|||
</Path.RenderTransform> |
|||
</Path> |
|||
</Canvas> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsDragging" Value="True"> |
|||
<Setter Property="Foreground" |
|||
Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/> |
|||
</Trigger> |
|||
<Trigger Property="IsEnabled" Value="False"> |
|||
<Setter Property="Foreground" |
|||
Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<Style x:Key="OpacitySliderStyle" TargetType="{x:Type Slider}"> |
|||
<Setter Property="Orientation" Value="Vertical"/> |
|||
<Setter Property="Minimum" Value="0" /> |
|||
<Setter Property="Maximum" Value="1" /> |
|||
<Setter Property="TickFrequency" Value="0.01" /> |
|||
<Setter Property="SmallChange" Value="0.01" /> |
|||
<Setter Property="LargeChange" Value="0.02" /> |
|||
<Setter Property="IsDirectionReversed" Value="False" /> |
|||
<Setter Property="IsMoveToPointEnabled" Value="True" /> |
|||
<Setter Property="Background"> |
|||
<Setter.Value> |
|||
<LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5"> |
|||
<LinearGradientBrush.RelativeTransform> |
|||
<TransformGroup> |
|||
<ScaleTransform CenterY="0.5" CenterX="0.5"/> |
|||
<SkewTransform CenterY="0.5" CenterX="0.5"/> |
|||
<RotateTransform Angle="90" CenterY="0.5" CenterX="0.5"/> |
|||
<TranslateTransform/> |
|||
</TransformGroup> |
|||
</LinearGradientBrush.RelativeTransform> |
|||
<GradientStop Color="White" /> |
|||
<GradientStop Color="Transparent" Offset="1" /> |
|||
</LinearGradientBrush> |
|||
</Setter.Value> |
|||
</Setter> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type Slider}"> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="*"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Border x:Name="PART_TrackBackground" Background="{TemplateBinding Background}" Grid.Column="1" Width="20" /> |
|||
|
|||
<Track Grid.Column="1" Name="PART_Track"> |
|||
<Track.DecreaseRepeatButton> |
|||
<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="Slider.DecreaseLarge"/> |
|||
</Track.DecreaseRepeatButton> |
|||
<Track.IncreaseRepeatButton> |
|||
<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="Slider.IncreaseLarge"/> |
|||
</Track.IncreaseRepeatButton> |
|||
|
|||
<Track.Thumb> |
|||
<Thumb Style="{StaticResource VerticalSlideThumbStyle}" /> |
|||
</Track.Thumb> |
|||
</Track> |
|||
|
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<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> |
|||
|
|||
<Style TargetType="{x:Type local:ColorPicker}"> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type local:ColorPicker}"> |
|||
<Grid> |
|||
<Border BorderBrush="{StaticResource ColorPickerDarkBorderBrush}" BorderThickness="1" CornerRadius="1"> |
|||
<Grid> |
|||
<ToggleButton x:Name="PART_ColorPickerToggleButton" Style="{StaticResource ColorPickerToggleButton}" Height="25"> |
|||
<ToggleButton.Background> |
|||
<SolidColorBrush Color="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}"/> |
|||
</ToggleButton.Background> |
|||
<ToggleButton.Content> |
|||
<Grid x:Name="arrowGlyph" IsHitTestVisible="False"> |
|||
<Path Height="3" Width="5" Stretch="Fill" Fill="#FFFFFFFF" Margin="0,1,0,0" |
|||
Data="M 0,0 C0,0 0,1 0,1 0,1 1,1 1,1 1,1 1,2 1,2 1,2 2,2 2,2 2,2 2,3 2,3 2,3 3,3 3,3 3,3 3,2 3,2 3,2 4,2 4,2 4,2 4,1 4,1 4,1 5,1 5,1 5,1 5,0 5,0 5,0 0,0 0,0 z" /> |
|||
<Path Height="3" Width="5" Stretch="Fill" Fill="{StaticResource ColorPickerDarkBorderBrush}" |
|||
Data="M 0,0 C0,0 0,1 0,1 0,1 1,1 1,1 1,1 1,2 1,2 1,2 2,2 2,2 2,2 2,3 2,3 2,3 3,3 3,3 3,3 3,2 3,2 3,2 4,2 4,2 4,2 4,1 4,1 4,1 5,1 5,1 5,1 5,0 5,0 5,0 0,0 0,0 z" /> |
|||
</Grid> |
|||
</ToggleButton.Content> |
|||
</ToggleButton> |
|||
</Grid> |
|||
</Border> |
|||
|
|||
<Popup x:Name="PART_ColorPickerCanvasPopup" VerticalAlignment="Bottom" IsOpen="False" > |
|||
<Border BorderThickness="1" Background="White" BorderBrush="{StaticResource ColorPickerDarkBorderBrush}" Padding="3"> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Grid Margin="2"> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions > |
|||
<ColumnDefinition Width="200"></ColumnDefinition> |
|||
<ColumnDefinition Width="5"></ColumnDefinition> |
|||
<ColumnDefinition Width="22"></ColumnDefinition> |
|||
<ColumnDefinition Width="5"></ColumnDefinition> |
|||
<ColumnDefinition Width="22"></ColumnDefinition> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="20"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Border BorderThickness="1" BorderBrush="DarkGray" ClipToBounds="True" Background="{StaticResource CheckerBrush}"> |
|||
<Canvas x:Name="PART_ColorShadingCanvas" Width="200" Height="100" HorizontalAlignment="Left" VerticalAlignment="Top"> |
|||
<Rectangle x:Name="ColorShadingRectangle" Height="{Binding ElementName=PART_ColorShadingCanvas,Path=Height}" Width="{Binding ElementName=PART_ColorShadingCanvas,Path=Width}" > |
|||
<Rectangle.Fill> |
|||
<SolidColorBrush Color="{Binding ElementName=PART_SpectrumSlider, Path=SelectedColor}" /> |
|||
</Rectangle.Fill> |
|||
</Rectangle> |
|||
<Rectangle x:Name="WhiteGradient" Width="{Binding ElementName=PART_ColorShadingCanvas,Path=Width}" Height="{Binding ElementName=PART_ColorShadingCanvas,Path=Height}" > |
|||
<Rectangle.Fill> |
|||
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0"> |
|||
<GradientStop Offset="0" Color="#ffffffff"/> |
|||
<GradientStop Offset="1" Color="Transparent"/> |
|||
</LinearGradientBrush> |
|||
</Rectangle.Fill> |
|||
</Rectangle> |
|||
<Rectangle x:Name="BlackGradient" Width="{Binding ElementName=PART_ColorShadingCanvas,Path=Width}" Height="{Binding ElementName=PART_ColorShadingCanvas,Path=Height}" > |
|||
<Rectangle.Fill> |
|||
<LinearGradientBrush StartPoint="0,1" EndPoint="0, 0"> |
|||
<GradientStop Offset="0" Color="#ff000000"/> |
|||
<GradientStop Offset="1" Color="#00000000"/> |
|||
</LinearGradientBrush> |
|||
</Rectangle.Fill> |
|||
</Rectangle> |
|||
<Canvas x:Name="PART_ColorShadeSelector" Width="10" Height="10" IsHitTestVisible="False"> |
|||
<Ellipse Width="10" Height="10" StrokeThickness="3" Stroke="#FFFFFFFF" IsHitTestVisible="False" /> |
|||
<Ellipse Width="10" Height="10" StrokeThickness="1" Stroke="#FF000000" IsHitTestVisible="False" /> |
|||
</Canvas> |
|||
</Canvas> |
|||
</Border> |
|||
|
|||
<Border BorderThickness="0,1,0,0" Grid.Row="1"> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="*"/> |
|||
<ColumnDefinition Width="*"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid Background="{StaticResource CheckerBrush}"> |
|||
<Rectangle x:Name="SelectedColor"> |
|||
<Rectangle.Fill> |
|||
<SolidColorBrush Color="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}}"/> |
|||
</Rectangle.Fill> |
|||
</Rectangle> |
|||
</Grid> |
|||
<Grid Grid.Column="1" Background="{StaticResource CheckerBrush}"> |
|||
<Rectangle x:Name="CurrentColor"> |
|||
<Rectangle.Fill> |
|||
<SolidColorBrush Color="{Binding CurrentColor, RelativeSource={RelativeSource TemplatedParent}}"/> |
|||
</Rectangle.Fill> |
|||
</Rectangle> |
|||
</Grid> |
|||
</Grid> |
|||
</Border> |
|||
|
|||
<Border BorderThickness="1" BorderBrush="DarkGray" Grid.Column="2" Grid.RowSpan="2" ClipToBounds="True"> |
|||
<local:ColorSpectrumSlider x:Name="PART_SpectrumSlider" Width="20" /> |
|||
</Border> |
|||
|
|||
|
|||
<Border Grid.Column="4" Grid.RowSpan="2" BorderThickness="1" BorderBrush="DarkGray" Background="{StaticResource CheckerBrush}" ClipToBounds="True"> |
|||
<Slider x:Name="PART_OpacitySlider" |
|||
Style="{StaticResource OpacitySliderStyle}" |
|||
Value="{Binding Path=ScA, RelativeSource={RelativeSource TemplatedParent}}"/> |
|||
</Border> |
|||
</Grid> |
|||
</Grid> |
|||
<Button x:Name="PART_OkButton" Grid.Row="1" HorizontalAlignment="Right" MinWidth="50" Cursor="Hand" Content="OK" /> |
|||
</Grid> |
|||
</Border> |
|||
</Popup> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<Style TargetType="{x:Type local:ColorSpectrumSlider}"> |
|||
<Setter Property="Orientation" Value="Vertical"/> |
|||
<Setter Property="Background" Value="Transparent"/> |
|||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> |
|||
<Setter Property="Minimum" Value="1"/> |
|||
<Setter Property="Maximum" Value="360"/> |
|||
<Setter Property="TickFrequency" Value="0.001" /> |
|||
<Setter Property="IsSnapToTickEnabled" Value="True" /> |
|||
<Setter Property="IsDirectionReversed" Value="False" /> |
|||
<Setter Property="IsMoveToPointEnabled" Value="True" /> |
|||
<Setter Property="Value" Value="1" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type local:ColorSpectrumSlider}"> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="*"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Border x:Name="PART_TrackBackground" Grid.Column="1" Width="20"> |
|||
<Rectangle x:Name="PART_SpectrumDisplay" Stretch="Fill" VerticalAlignment="Stretch" /> |
|||
</Border> |
|||
|
|||
<Track Grid.Column="1" Name="PART_Track"> |
|||
<Track.DecreaseRepeatButton> |
|||
<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="Slider.DecreaseLarge"/> |
|||
</Track.DecreaseRepeatButton> |
|||
<Track.IncreaseRepeatButton> |
|||
<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="Slider.IncreaseLarge"/> |
|||
</Track.IncreaseRepeatButton> |
|||
|
|||
<Track.Thumb> |
|||
<Thumb Style="{StaticResource VerticalSlideThumbStyle}" /> |
|||
</Track.Thumb> |
|||
</Track> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
</ResourceDictionary> |
|||
@ -1,286 +0,0 @@ |
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Microsoft.Windows.Controls"> |
|||
|
|||
<!-- =============================================================================== --> |
|||
<!-- MessageBox --> |
|||
<!-- =============================================================================== --> |
|||
|
|||
<LinearGradientBrush x:Key="MessageBoxDarkBrush" EndPoint="0.5,1" StartPoint="0.5,0"> |
|||
<GradientStop Color="#FFA3AEB9" Offset="0"/> |
|||
<GradientStop Color="#FF8399A9" Offset="0.375"/> |
|||
<GradientStop Color="#FF718597" Offset="0.375"/> |
|||
<GradientStop Color="#FF617584" Offset="1"/> |
|||
</LinearGradientBrush> |
|||
|
|||
<LinearGradientBrush x:Key="MessageBoxWindowBackgroundBrush" StartPoint="0,0" EndPoint="0,1"> |
|||
<LinearGradientBrush.GradientStops> |
|||
<GradientStopCollection> |
|||
<GradientStop Offset="0" Color="#FFffffff"/> |
|||
<GradientStop Offset="0.479" Color="#FFf4f5f6"/> |
|||
<GradientStop Offset="1" Color="#FFd0d6db"/> |
|||
</GradientStopCollection> |
|||
</LinearGradientBrush.GradientStops> |
|||
</LinearGradientBrush> |
|||
|
|||
<LinearGradientBrush x:Key="MessageBoxWindowButtonHoverBrush" StartPoint="0,0" EndPoint="0,1"> |
|||
<LinearGradientBrush.GradientStops> |
|||
<GradientStopCollection> |
|||
<GradientStop Offset="0" Color="#FFb5bdc8"/> |
|||
<GradientStop Offset="0.370" Color="#FF8399a9"/> |
|||
<GradientStop Offset="0.370" Color="#FF718597"/> |
|||
<GradientStop Offset="0.906" Color="#FFb9c1ca"/> |
|||
<GradientStop Offset="1" Color="#FFb9c1ca"/> |
|||
</GradientStopCollection> |
|||
</LinearGradientBrush.GradientStops> |
|||
</LinearGradientBrush> |
|||
|
|||
<LinearGradientBrush x:Key="MessageBoxWindowButtonPressedBrush" StartPoint="0,0" EndPoint="0,1"> |
|||
<LinearGradientBrush.GradientStops> |
|||
<GradientStopCollection> |
|||
<GradientStop Offset="0" Color="#FF6b7c8d"/> |
|||
<GradientStop Offset="0.370" Color="#FF4d606f"/> |
|||
<GradientStop Offset="0.370" Color="#FF465460"/> |
|||
<GradientStop Offset="0.906" Color="#FF262d33"/> |
|||
<GradientStop Offset="1" Color="#FF262d33"/> |
|||
</GradientStopCollection> |
|||
</LinearGradientBrush.GradientStops> |
|||
</LinearGradientBrush> |
|||
|
|||
<Style x:Key="MessageBoxCloseButtonStyle" TargetType="Button"> |
|||
<Setter Property="Foreground" Value="#FF000000"/> |
|||
<Setter Property="Padding" Value="3"/> |
|||
<Setter Property="BorderThickness" Value="1"/> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="Button"> |
|||
<Grid> |
|||
<VisualStateManager.VisualStateGroups> |
|||
<VisualStateGroup x:Name="CommonStates"> |
|||
<VisualState x:Name="Normal"/> |
|||
<VisualState x:Name="MouseOver"> |
|||
<Storyboard> |
|||
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background)"> |
|||
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource MessageBoxWindowButtonHoverBrush}"></DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
</Storyboard> |
|||
</VisualState> |
|||
<VisualState x:Name="Pressed"> |
|||
<Storyboard> |
|||
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background)"> |
|||
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource MessageBoxWindowButtonPressedBrush}"></DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
</Storyboard> |
|||
</VisualState> |
|||
</VisualStateGroup> |
|||
</VisualStateManager.VisualStateGroups> |
|||
<Border x:Name="Background" CornerRadius="0,0,2,0" Background="{StaticResource MessageBoxDarkBrush}"> |
|||
<Border Margin="1,0,1,1" BorderBrush="#59FFFFFF" BorderThickness="1" CornerRadius="0,0,1,0"/> |
|||
</Border> |
|||
<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/> |
|||
<Path x:Name="path" |
|||
Height="6" |
|||
Width="7" |
|||
Stretch="Fill" |
|||
Opacity="1" |
|||
Data="M 2,6 C2,6 3,6 3,6 3,6 3,5 3,5 3,5 4,5 4,5 4,5 4,6 4,6 4,6 5,6 5,6 5,6 7,6 7,6 7,6 7,5 7,5 7,5 6,5 6,5 6,5 6,4 6,4 6,4 5,4 5,4 5,4 5,2 5,2 5,2 6,2 6,2 6,2 6,1 6,1 6,1 7,1 7,1 7,1 7,0 7,0 7,0 5,0 5,0 5,0 4,0 4,0 4,0 4,1 4,1 4,1 3,1 3,1 3,1 3,0 3,0 3,0 2,0 2,0 2,0 0,0 0,0 0,0 0,1 0,1 0,1 1,1 1,1 1,1 1,2 1,2 1,2 2,2 2,2 2,2 2,4 2,4 2,4 1,4 1,4 1,4 1,5 1,5 1,5 0,5 0,5 0,5 0,6 0,6 0,6 2,6 2,6 z" |
|||
Fill="White" Margin="0,0,0,1" Visibility="Collapsed" /> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<ControlTemplate x:Key="MessageBoxDragWidgetTemplate" TargetType="{x:Type Thumb}"> |
|||
<Border Background="Transparent"> |
|||
</Border> |
|||
</ControlTemplate> |
|||
|
|||
<Style TargetType="{x:Type local:MessageBox}"> |
|||
<Setter Property="Background" Value="#FFFFFFFF"/> |
|||
<Setter Property="BorderBrush" Value="{StaticResource MessageBoxDarkBrush}" /> |
|||
<Setter Property="BorderThickness" Value="1" /> |
|||
<Setter Property="CaptionForeground" Value="#FF000000" /> |
|||
<Setter Property="CloseButtonStyle" Value="{StaticResource MessageBoxCloseButtonStyle}" /> |
|||
<Setter Property="HorizontalAlignment" Value="Left" /> |
|||
<Setter Property="HorizontalContentAlignment" Value="Left" /> |
|||
<Setter Property="IsEnabled" Value="true" /> |
|||
<Setter Property="MinWidth" Value="350" /> |
|||
<Setter Property="MinHeight" Value="50" /> |
|||
<Setter Property="VerticalAlignment" Value="Top" /> |
|||
<Setter Property="VerticalContentAlignment" Value="Top" /> |
|||
<Setter Property="WindowBorderBrush" Value="{StaticResource MessageBoxDarkBrush}" /> |
|||
<Setter Property="WindowBackground" Value="{StaticResource MessageBoxWindowBackgroundBrush}" /> |
|||
<Setter Property="WindowOpacity" Value="1.0" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="{x:Type local:MessageBox}"> |
|||
<Grid x:Name="Root"> |
|||
<VisualStateManager.VisualStateGroups> |
|||
<VisualStateGroup x:Name="group1"> |
|||
<VisualState x:Name="OK"> |
|||
<Storyboard> |
|||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OkGrid" Storyboard.TargetProperty="Visibility"> |
|||
<DiscreteObjectKeyFrame KeyTime="0"> |
|||
<DiscreteObjectKeyFrame.Value> |
|||
<Visibility>Visible</Visibility> |
|||
</DiscreteObjectKeyFrame.Value> |
|||
</DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
</Storyboard> |
|||
</VisualState> |
|||
<VisualState x:Name="OKCancel"> |
|||
<Storyboard> |
|||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OkCancelGrid" Storyboard.TargetProperty="Visibility"> |
|||
<DiscreteObjectKeyFrame KeyTime="0"> |
|||
<DiscreteObjectKeyFrame.Value> |
|||
<Visibility>Visible</Visibility> |
|||
</DiscreteObjectKeyFrame.Value> |
|||
</DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
</Storyboard> |
|||
</VisualState> |
|||
<VisualState x:Name="YesNo"> |
|||
<Storyboard> |
|||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="YesNoGrid" Storyboard.TargetProperty="Visibility"> |
|||
<DiscreteObjectKeyFrame KeyTime="0"> |
|||
<DiscreteObjectKeyFrame.Value> |
|||
<Visibility>Visible</Visibility> |
|||
</DiscreteObjectKeyFrame.Value> |
|||
</DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
</Storyboard> |
|||
</VisualState> |
|||
|
|||
<VisualState x:Name="YesNoCancel"> |
|||
<Storyboard> |
|||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="YesNoCancelGrid" Storyboard.TargetProperty="Visibility"> |
|||
<DiscreteObjectKeyFrame KeyTime="0"> |
|||
<DiscreteObjectKeyFrame.Value> |
|||
<Visibility>Visible</Visibility> |
|||
</DiscreteObjectKeyFrame.Value> |
|||
</DiscreteObjectKeyFrame> |
|||
</ObjectAnimationUsingKeyFrames> |
|||
</Storyboard> |
|||
</VisualState> |
|||
</VisualStateGroup> |
|||
</VisualStateManager.VisualStateGroups> |
|||
|
|||
<!-- Borders --> |
|||
<Grid x:Name="MessageBoxWindowGrid"> |
|||
<Border BorderBrush="{TemplateBinding WindowBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="5,5,0,0" Opacity="{TemplateBinding WindowOpacity}"/> |
|||
<Grid Margin="0" Background="{x:Null}"> |
|||
<Border x:Name="MessageBoxWindow" Margin="1,1,1,1" Background="{TemplateBinding WindowBackground}" CornerRadius="4,4,0,0" Opacity="{TemplateBinding WindowOpacity}"/> |
|||
<Border BorderBrush="White" BorderThickness="1" CornerRadius="4,4,0,0" Margin="1" Opacity="0.7"/> |
|||
</Grid> |
|||
</Grid> |
|||
|
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" MinHeight="26"/> |
|||
<RowDefinition /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<!-- Content Border --> |
|||
<Grid Margin="6,0,6,6" x:Name="ContentGrid" Grid.Row="1"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderBrush="#FFFFFFFF" BorderThickness="1" CornerRadius="1"/> |
|||
<Border Margin="1" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0.1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"> |
|||
|
|||
<Grid MinWidth="350"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Grid Margin="24,16,24,22"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="*"/> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<!-- Message Image --> |
|||
<Image x:Name="MessageBoxImage" VerticalAlignment="Top" SnapsToDevicePixels="True" Stretch="None" Margin="-6,-1,10,-4" Source="{TemplateBinding ImageSource}"></Image> |
|||
|
|||
<!-- Message Text --> |
|||
<TextBlock x:Name="MessageText" Grid.Column="1" TextWrapping="Wrap" VerticalAlignment="Center" MaxWidth="450" |
|||
Text="{TemplateBinding Text}" |
|||
FontFamily="{TemplateBinding FontFamily}" |
|||
FontSize="{TemplateBinding FontSize}" |
|||
FontStyle="{TemplateBinding FontStyle}" |
|||
FontWeight="{TemplateBinding FontWeight}" |
|||
Foreground="{TemplateBinding Foreground}"/> |
|||
|
|||
</Grid> |
|||
|
|||
<!-- Buttons --> |
|||
<Grid Grid.Row="1" HorizontalAlignment="Right" Margin="12,0,12,12"> |
|||
<Grid x:Name="OkGrid" Visibility="Collapsed"> |
|||
<Button x:Name="PART_OkButton" MinWidth="65" Margin="6,0,0,0">OK</Button> |
|||
</Grid> |
|||
<Grid x:Name="OkCancelGrid" Visibility="Collapsed"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Button x:Name="PART_OkButton1" MinWidth="65" Margin="6,0,0,0">OK</Button> |
|||
<Button Grid.Column="1" x:Name="PART_CancelButton" MinWidth="65" Margin="6,0,0,0">Cancel</Button> |
|||
</Grid> |
|||
<Grid x:Name="YesNoGrid" Visibility="Collapsed"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Button x:Name="PART_YesButton" MinWidth="65" Margin="6,0,0,0">Yes</Button> |
|||
<Button Grid.Column="1" x:Name="PART_NoButton" MinWidth="65" Margin="6,0,0,0">No</Button> |
|||
</Grid> |
|||
<Grid x:Name="YesNoCancelGrid" Visibility="Collapsed"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Button x:Name="PART_YesButton1" MinWidth="65" Margin="6,0,0,0">Yes</Button> |
|||
<Button Grid.Column="1" x:Name="PART_NoButton1" MinWidth="65" Margin="6,0,0,0">No</Button> |
|||
<Button Grid.Column="2" x:Name="PART_CancelButton1" MinWidth="65" Margin="6,0,0,0">Cancel</Button> |
|||
</Grid> |
|||
</Grid> |
|||
</Grid> |
|||
</Border> |
|||
</Grid> |
|||
|
|||
<!-- Header --> |
|||
<Border x:Name="HeaderArea" Background="Transparent" Grid.Column="1" CornerRadius="5,5,0,0" Margin="1,1,1,0"> |
|||
<Grid> |
|||
<Grid x:Name="CaptionHeader" Margin="1,1,105,0" VerticalAlignment="Center"> |
|||
<!-- Caption --> |
|||
<ContentControl x:Name="Caption" Margin="5,0,0,0" IsTabStop="False" HorizontalAlignment="Stretch" |
|||
Content="{TemplateBinding Caption}" |
|||
Foreground="{TemplateBinding CaptionForeground}"/> |
|||
|
|||
</Grid> |
|||
<Thumb x:Name="PART_DragWidget" Template="{StaticResource MessageBoxDragWidgetTemplate}"/> |
|||
</Grid> |
|||
</Border> |
|||
|
|||
</Grid> |
|||
|
|||
<Border x:Name="Resize" BorderThickness="7" BorderBrush="Transparent" /> |
|||
|
|||
<!-- Close Button --> |
|||
<Border BorderBrush="#A5FFFFFF" BorderThickness="1,0,1,1" CornerRadius="0,0,3,3" VerticalAlignment="Top" Margin="0,1,7,0" HorizontalAlignment="Right"> |
|||
<Button x:Name="PART_CloseButton" Style="{TemplateBinding CloseButtonStyle}" Height="17" Width="43" IsTabStop="False"> |
|||
<Path Height="10" HorizontalAlignment="Center" VerticalAlignment="Center" Width="12" Fill="#E4FFFFFF" Stretch="Fill" Stroke="#FF535666" |
|||
Data="M0.5,0.5 L4.5178828,0.5 L6.0620003,3.125 L7.4936447,0.5 L11.5,0.5 L11.5,1.5476431 L8.7425003,6.1201854 L11.5,10.359666 L11.5,11.5 L7.4941902,11.5 L6.0620003,8.8740005 L4.5172949,11.5 L0.5,11.5 L0.5,10.43379 L3.3059995,6.1201582 L0.5,1.4676378 L0.5,0.5 z"/> |
|||
</Button> |
|||
</Border> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
</ResourceDictionary> |
|||
Loading…
Reference in new issue