394 lines
26 KiB
XML
394 lines
26 KiB
XML
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:extend="clr-namespace:MECF.Framework.UI.Core.Style"
|
|
xmlns:vsm="clr-namespace:System.Windows;assembly=PresentationFramework">
|
|
|
|
<!-- 多边形 -->
|
|
<Style TargetType="Polygon">
|
|
<Setter Property="Opacity" Value="0.5" />
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Opacity" Value="0.8" />
|
|
<Setter Property="StrokeThickness" Value="3" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="BasePolygon"
|
|
BasedOn="{StaticResource {x:Type Polygon}}"
|
|
TargetType="Polygon">
|
|
<Setter Property="Height" Value="39.27" />
|
|
<Setter Property="Width" Value="41.814" />
|
|
<Setter Property="Stroke" Value="Black" />
|
|
<Setter Property="Fill" Value="LightSeaGreen" />
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="RightPolygon"
|
|
BasedOn="{StaticResource BasePolygon}"
|
|
TargetType="Polygon">
|
|
<Setter Property="Points" Value="0,0,0,30,30,15" />
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="UpPolygon"
|
|
BasedOn="{StaticResource BasePolygon}"
|
|
TargetType="Polygon">
|
|
<Setter Property="Points" Value="0,30 15,0 30,30" />
|
|
</Style>
|
|
|
|
<!-- 椭圆形 -->
|
|
<Style TargetType="Ellipse">
|
|
<Setter Property="Opacity" Value="0.5" />
|
|
<Setter Property="Height" Value="15" />
|
|
<Setter Property="Width" Value="15" />
|
|
<Setter Property="Stroke" Value="Black" />
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Opacity" Value="0.8" />
|
|
<Setter Property="StrokeThickness" Value="2" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style TargetType="{x:Type extend:HeaderPanel}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type extend:HeaderPanel}">
|
|
<Border
|
|
Grid.Row="2"
|
|
Width="{TemplateBinding Width}"
|
|
Height="{TemplateBinding Height}"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Top"
|
|
BorderBrush="#84a567"
|
|
BorderThickness="1">
|
|
<DockPanel Background="#d6f1ff">
|
|
<Label
|
|
Width="{TemplateBinding Width}"
|
|
Height="35"
|
|
HorizontalContentAlignment="Center"
|
|
Background="{StaticResource HeaderPanel_BG_Title}"
|
|
Content="{TemplateBinding Header}"
|
|
DockPanel.Dock="Top" />
|
|
<ContentPresenter />
|
|
</DockPanel>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="DatePickerStyle.Centered" TargetType="{x:Type DatePicker}">
|
|
<Setter Property="Foreground" Value="#FF333333" />
|
|
<Setter Property="IsTodayHighlighted" Value="True" />
|
|
<Setter Property="SelectedDateFormat" Value="Short" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Padding" Value="2" />
|
|
<Setter Property="BorderBrush">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint=".5,1" EndPoint=".5,0">
|
|
<GradientStop Offset="0" Color="#FFA3AEB9" />
|
|
<GradientStop Offset="0.375" Color="#FF8399A9" />
|
|
<GradientStop Offset="0.375" Color="#FF718597" />
|
|
<GradientStop Offset="1" Color="#FF617584" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type DatePicker}">
|
|
<Border
|
|
Padding="{TemplateBinding Padding}"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}">
|
|
<Grid
|
|
x:Name="PART_Root"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
|
<Grid.Resources>
|
|
<SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF" />
|
|
<ControlTemplate x:Key="DropDownButtonTemplate" TargetType="{x:Type Button}">
|
|
<Grid>
|
|
<Grid
|
|
Width="19"
|
|
Height="18"
|
|
Margin="0"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Background="#11FFFFFF"
|
|
FlowDirection="LeftToRight">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="20*" />
|
|
<ColumnDefinition Width="20*" />
|
|
<ColumnDefinition Width="20*" />
|
|
<ColumnDefinition Width="20*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="23*" />
|
|
<RowDefinition Height="19*" />
|
|
<RowDefinition Height="19*" />
|
|
<RowDefinition Height="19*" />
|
|
</Grid.RowDefinitions>
|
|
<Border
|
|
x:Name="Highlight"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="4"
|
|
Grid.ColumnSpan="4"
|
|
Margin="-1"
|
|
BorderBrush="#FF45D6FA"
|
|
BorderThickness="1"
|
|
CornerRadius="0,0,1,1"
|
|
Opacity="0" />
|
|
<Border
|
|
x:Name="Background"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="3"
|
|
Grid.ColumnSpan="4"
|
|
Margin="0,-1,0,0"
|
|
Background="#FF1F3B53"
|
|
BorderBrush="#FFFFFFFF"
|
|
BorderThickness="1"
|
|
CornerRadius=".5"
|
|
Opacity="1" />
|
|
<Border
|
|
x:Name="BackgroundGradient"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="3"
|
|
Grid.ColumnSpan="4"
|
|
Margin="0,-1,0,0"
|
|
BorderBrush="#BF000000"
|
|
BorderThickness="1"
|
|
CornerRadius=".5"
|
|
Opacity="1">
|
|
<Border.Background>
|
|
<LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
|
|
<GradientStop Offset="0" Color="#FFFFFFFF" />
|
|
<GradientStop Offset="0.375" Color="#F9FFFFFF" />
|
|
<GradientStop Offset="0.625" Color="#E5FFFFFF" />
|
|
<GradientStop Offset="1" Color="#C6FFFFFF" />
|
|
</LinearGradientBrush>
|
|
</Border.Background>
|
|
</Border>
|
|
<Rectangle
|
|
Grid.RowSpan="1"
|
|
Grid.ColumnSpan="4"
|
|
StrokeThickness="1">
|
|
<Rectangle.Fill>
|
|
<LinearGradientBrush StartPoint="0.46,1.6" EndPoint="0.3,-1.1">
|
|
<GradientStop Color="#FF4084BD" />
|
|
<GradientStop Offset="1" Color="#FFAFCFEA" />
|
|
</LinearGradientBrush>
|
|
</Rectangle.Fill>
|
|
<Rectangle.Stroke>
|
|
<LinearGradientBrush StartPoint="0.48,1.25" EndPoint="0.48,-1">
|
|
<GradientStop Color="#FF494949" />
|
|
<GradientStop Offset="1" Color="#FF9F9F9F" />
|
|
</LinearGradientBrush>
|
|
</Rectangle.Stroke>
|
|
</Rectangle>
|
|
<Path
|
|
Grid.Row="1"
|
|
Grid.RowSpan="3"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="4"
|
|
Margin="4,3,4,3"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="M11.426758,8.4305077 L11.749023,8.4305077 L11.749023,16.331387 L10.674805,16.331387 L10.674805,10.299648 L9.0742188,11.298672 L9.0742188,10.294277 C9.4788408,10.090176 9.9094238,9.8090878 10.365967,9.4510155 C10.82251,9.0929432 11.176106,8.7527733 11.426758,8.4305077 z M14.65086,8.4305077 L18.566387,8.4305077 L18.566387,9.3435936 L15.671368,9.3435936 L15.671368,11.255703 C15.936341,11.058764 16.27293,10.960293 16.681133,10.960293 C17.411602,10.960293 17.969301,11.178717 18.354229,11.615566 C18.739157,12.052416 18.931622,12.673672 18.931622,13.479336 C18.931622,15.452317 18.052553,16.438808 16.294415,16.438808 C15.560365,16.438808 14.951641,16.234707 14.468243,15.826504 L14.881817,14.929531 C15.368796,15.326992 15.837872,15.525723 16.289043,15.525723 C17.298809,15.525723 17.803692,14.895514 17.803692,13.635098 C17.803692,12.460618 17.305971,11.873379 16.310528,11.873379 C15.83071,11.873379 15.399232,12.079271 15.016094,12.491055 L14.65086,12.238613 z"
|
|
Fill="#FF2F2F2F"
|
|
RenderTransformOrigin="0.5,0.5"
|
|
Stretch="Fill" />
|
|
<Ellipse
|
|
Grid.ColumnSpan="4"
|
|
Width="3"
|
|
Height="3"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Fill="#FFFFFFFF"
|
|
StrokeThickness="0" />
|
|
<Border
|
|
x:Name="DisabledVisual"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="4"
|
|
Grid.ColumnSpan="4"
|
|
BorderBrush="#B2FFFFFF"
|
|
BorderThickness="1"
|
|
CornerRadius="0,0,.5,.5"
|
|
Opacity="0" />
|
|
</Grid>
|
|
<vsm:VisualStateManager.VisualStateGroups>
|
|
<vsm:VisualStateGroup x:Name="CommonStates">
|
|
<vsm:VisualStateGroup.Transitions>
|
|
<vsm:VisualTransition GeneratedDuration="0" />
|
|
<vsm:VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
|
|
<vsm:VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
|
|
</vsm:VisualStateGroup.Transitions>
|
|
<vsm:VisualState x:Name="Normal" />
|
|
<vsm:VisualState x:Name="MouseOver">
|
|
<Storyboard>
|
|
<ColorAnimation
|
|
Storyboard.TargetName="Background"
|
|
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
|
To="#FF448DCA"
|
|
Duration="0" />
|
|
<ColorAnimationUsingKeyFrames
|
|
BeginTime="0"
|
|
Storyboard.TargetName="BackgroundGradient"
|
|
Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
|
|
Duration="00:00:00.001">
|
|
<SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF" />
|
|
</ColorAnimationUsingKeyFrames>
|
|
<ColorAnimationUsingKeyFrames
|
|
BeginTime="0"
|
|
Storyboard.TargetName="BackgroundGradient"
|
|
Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
|
|
Duration="00:00:00.001">
|
|
<SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF" />
|
|
</ColorAnimationUsingKeyFrames>
|
|
<ColorAnimationUsingKeyFrames
|
|
BeginTime="0"
|
|
Storyboard.TargetName="BackgroundGradient"
|
|
Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
|
|
Duration="00:00:00.001">
|
|
<SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF" />
|
|
</ColorAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</vsm:VisualState>
|
|
<vsm:VisualState x:Name="Pressed">
|
|
<Storyboard>
|
|
<ColorAnimationUsingKeyFrames
|
|
BeginTime="0"
|
|
Storyboard.TargetName="Background"
|
|
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
|
Duration="00:00:00.001">
|
|
<SplineColorKeyFrame KeyTime="0" Value="#FF448DCA" />
|
|
</ColorAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames
|
|
BeginTime="0"
|
|
Storyboard.TargetName="Highlight"
|
|
Storyboard.TargetProperty="(UIElement.Opacity)"
|
|
Duration="00:00:00.001">
|
|
<SplineDoubleKeyFrame KeyTime="0" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<ColorAnimationUsingKeyFrames
|
|
BeginTime="0"
|
|
Storyboard.TargetName="BackgroundGradient"
|
|
Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
|
|
Duration="00:00:00.001">
|
|
<SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF" />
|
|
</ColorAnimationUsingKeyFrames>
|
|
<ColorAnimationUsingKeyFrames
|
|
BeginTime="0"
|
|
Storyboard.TargetName="BackgroundGradient"
|
|
Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)"
|
|
Duration="00:00:00.001">
|
|
<SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF" />
|
|
</ColorAnimationUsingKeyFrames>
|
|
<ColorAnimationUsingKeyFrames
|
|
BeginTime="0"
|
|
Storyboard.TargetName="BackgroundGradient"
|
|
Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)"
|
|
Duration="00:00:00.001">
|
|
<SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF" />
|
|
</ColorAnimationUsingKeyFrames>
|
|
<ColorAnimationUsingKeyFrames
|
|
BeginTime="0"
|
|
Storyboard.TargetName="BackgroundGradient"
|
|
Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)"
|
|
Duration="00:00:00.001">
|
|
<SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF" />
|
|
</ColorAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</vsm:VisualState>
|
|
<vsm:VisualState x:Name="Disabled" />
|
|
</vsm:VisualStateGroup>
|
|
</vsm:VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Grid.Resources>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Button
|
|
x:Name="PART_Button"
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Width="20"
|
|
Height="20"
|
|
MinWidth="20"
|
|
MinHeight="20"
|
|
Margin="3,0,3,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
Focusable="False"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
Template="{StaticResource DropDownButtonTemplate}" />
|
|
<DatePickerTextBox
|
|
x:Name="PART_TextBox"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Focusable="{TemplateBinding Focusable}"
|
|
Foreground="{TemplateBinding Foreground}" />
|
|
<Grid
|
|
x:Name="PART_DisabledVisual"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
IsHitTestVisible="False"
|
|
Opacity="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Rectangle
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Fill="#A5FFFFFF"
|
|
RadiusX="1"
|
|
RadiusY="1" />
|
|
<Rectangle
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Width="19"
|
|
Height="18"
|
|
Margin="3,0,3,0"
|
|
Fill="#A5FFFFFF"
|
|
RadiusX="1"
|
|
RadiusY="1" />
|
|
<Popup
|
|
x:Name="PART_Popup"
|
|
AllowsTransparency="True"
|
|
Placement="Bottom"
|
|
PlacementTarget="{Binding ElementName=PART_TextBox}"
|
|
StaysOpen="False" />
|
|
</Grid>
|
|
</Grid>
|
|
<vsm:VisualStateManager.VisualStateGroups>
|
|
<vsm:VisualStateGroup x:Name="CommonStates">
|
|
<vsm:VisualState x:Name="Normal" />
|
|
<vsm:VisualState x:Name="Disabled">
|
|
<Storyboard>
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="PART_DisabledVisual"
|
|
Storyboard.TargetProperty="Opacity"
|
|
To="1"
|
|
Duration="0" />
|
|
</Storyboard>
|
|
</vsm:VisualState>
|
|
</vsm:VisualStateGroup>
|
|
</vsm:VisualStateManager.VisualStateGroups>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary> |