You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
299 lines
21 KiB
299 lines
21 KiB
<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">
|
|
|
|
<LinearGradientBrush x:Key="WindowDarkBrush" 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="WindowBackgroundBrush" 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="WindowButtonHoverBrush" 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="WindowButtonPressedBrush" 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="WindowCloseButtonStyle" 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 WindowButtonHoverBrush}"></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 WindowButtonPressedBrush}"></DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<Border x:Name="Background" CornerRadius="0,0,2,0" Background="{StaticResource WindowDarkBrush}">
|
|
<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>
|
|
|
|
<!-- =============================================================================== -->
|
|
<!-- MessageBox -->
|
|
<!-- =============================================================================== -->
|
|
|
|
<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 WindowDarkBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="CaptionForeground" Value="#FF000000" />
|
|
<Setter Property="CloseButtonStyle" Value="{StaticResource WindowCloseButtonStyle}" />
|
|
<Setter Property="Focusable" Value="False" />
|
|
<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="MaxHeight" Value="250" />
|
|
<Setter Property="VerticalAlignment" Value="Top" />
|
|
<Setter Property="VerticalContentAlignment" Value="Top" />
|
|
<Setter Property="WindowBorderBrush" Value="{StaticResource WindowDarkBrush}" />
|
|
<Setter Property="WindowBackground" Value="{StaticResource WindowBackgroundBrush}" />
|
|
<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="PART_OkButton" 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="PART_OkButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
<DiscreteObjectKeyFrame.Value>
|
|
<Visibility>Visible</Visibility>
|
|
</DiscreteObjectKeyFrame.Value>
|
|
</DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_CancelButton" 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="PART_YesButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
<DiscreteObjectKeyFrame.Value>
|
|
<Visibility>Visible</Visibility>
|
|
</DiscreteObjectKeyFrame.Value>
|
|
</DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_NoButton" 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="PART_YesButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
<DiscreteObjectKeyFrame.Value>
|
|
<Visibility>Visible</Visibility>
|
|
</DiscreteObjectKeyFrame.Value>
|
|
</DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_NoButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
<DiscreteObjectKeyFrame.Value>
|
|
<Visibility>Visible</Visibility>
|
|
</DiscreteObjectKeyFrame.Value>
|
|
</DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_CancelButton" 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 -->
|
|
<ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Auto">
|
|
<TextBlock x:Name="MessageText" TextWrapping="Wrap" VerticalAlignment="Center" MaxWidth="450"
|
|
Text="{TemplateBinding Text}"
|
|
FontFamily="{TemplateBinding FontFamily}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
FontStyle="{TemplateBinding FontStyle}"
|
|
FontWeight="{TemplateBinding FontWeight}"
|
|
Foreground="{TemplateBinding Foreground}"/>
|
|
</ScrollViewer>
|
|
|
|
</Grid>
|
|
|
|
<!-- Buttons -->
|
|
<Grid Grid.Row="1" HorizontalAlignment="Right" Margin="12,0,12,12">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Button Grid.Column="0" x:Name="PART_YesButton" MinWidth="65" Margin="6,0,0,0" Visibility="Collapsed" Content="{TemplateBinding YesButtonContent}" />
|
|
<Button Grid.Column="1" x:Name="PART_NoButton" MinWidth="65" Margin="6,0,0,0" Visibility="Collapsed" Content="{TemplateBinding NoButtonContent}" />
|
|
<Button Grid.Column="2" x:Name="PART_OkButton" MinWidth="65" Margin="6,0,0,0" Visibility="Collapsed" Content="{TemplateBinding OkButtonContent}" />
|
|
<Button Grid.Column="3" x:Name="PART_CancelButton" MinWidth="65" Margin="6,0,0,0" Visibility="Collapsed" Content="{TemplateBinding CancelButtonContent}" IsCancel="True" />
|
|
</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}" IsTabStop="False" />
|
|
</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>
|