<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:cls="clr-namespace:XHandler.Class">
|
|
<!--<ObjectDataProvider ObjectInstance="{x:Type Brushes}" MethodName="GetProperties" x:Key="Brushes" />-->
|
|
<cls:CmdBackgroundMultiConverter x:Key="cmdBackgroundMultiConverter"/>
|
<cls:CmdIconConvert x:Key="cmdIconConvert"/>
|
<cls:ColorConvert x:Key="colorConvert"/>
|
<cls:LeverToThicknessConvert x:Key="leverToThicknessConvert"/>
|
<cls:BrushTypeConverter x:Key="brushTypeConverter"/>
|
<cls:IntToVisibleConvert x:Key="intToVisibleConvert"/>
|
<cls:BoolToBackgroundConvert x:Key="boolToBackgroundConvert"/>
|
<cls:CmdIconMultiConvert x:Key="cmdIconMultiConvert"/>
|
<cls:EnableToBrush x:Key="enableToBrush"/>
|
<cls:WorkflowIconMultiConvert x:Key="workflowIconMultiConvert"/>
|
<cls:IntToEnableConvert x:Key="intToEnableConvert"/>
|
<cls:PercentageConverter x:Key="percentageConverter"/>
|
|
|
<cls:AutoManulaConvert x:Key="autoManulaConvert"/>
|
<cls:PickModeStringConvert x:Key="pickModeStringConvert"/>
|
<cls:YesNoStringConvert x:Key="yesNoStringConvert"/>
|
<cls:ExecResultStringConvert x:Key="execResultStringConvert"/>
|
<cls:MethodBackgroundConvert x:Key="methodBackgroundConvert"/>
|
<cls:MethodSelectedBackgroundConvert x:Key="methodSelectedBackgroundConvert"/>
|
<cls:MethodRanBackgroundConvert x:Key="methodRanBackgroundConvert"/>
|
<cls:Base64ToImage x:Key="Base64ToImage"/>
|
|
<Color x:Key="blueColor" A="#FF" R="#0E" G="#81" B="#EC"/>
|
<SolidColorBrush x:Key="blueBrush" Color="{DynamicResource blueColor}"/>
|
|
<Color x:Key="listSelectedColor" A="#FF" R="#AD" G="#D6" B="#FF"/>
|
<SolidColorBrush x:Key="listSelectedBrush" Color="{DynamicResource listSelectedColor}"/>
|
|
<Color x:Key="lightBlueColor" A="#FF" R="#DB" G="#EC" B="#FF"/>
|
<SolidColorBrush x:Key="lightBlueBrush" Color="{DynamicResource lightBlueColor}"/>
|
|
<!--<Color x:Key="lightGrayColor" A="#FF" R="#F7" G="#F8" B="#FA"/>-->
|
<Color x:Key="lightGrayColor" A="#FF" R="#F2" G="#F3" B="#F5"/>
|
<SolidColorBrush x:Key="lightGrayBrush" Color="{DynamicResource lightGrayColor}"/>
|
|
<Color x:Key="middleGrayColor" A="#FF" R="#E5" G="#E6" B="#EB"/>
|
<SolidColorBrush x:Key="middleGrayBrush" Color="{DynamicResource middleGrayColor}"/>
|
|
<Color x:Key="darkGrayColor" A="#FF" R="#61" G="#64" B="#67"/>
|
<SolidColorBrush x:Key="darkGrayBrush" Color="{DynamicResource darkGrayColor}"/>
|
|
<Style TargetType="{x:Type TextElement}">
|
<Setter Property="FontFamily" Value="Microsoft YaHei"/>
|
</Style>
|
<Style TargetType="{x:Type TextBlock}">
|
<Setter Property="FontFamily" Value="Microsoft YaHei"/>
|
</Style>
|
|
<!--#region ScrollViewer 滚动条-->
|
<Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
<Setter Property="IsTabStop" Value="false"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
<Grid>
|
<!--滚动条颜色-->
|
<Border Background="#646465" CornerRadius="3"/>
|
</Grid>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
<Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Focusable" Value="false"/>
|
<Setter Property="IsTabStop" Value="false"/>
|
<Setter Property="Opacity" Value="0.2"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
<Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
<Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Focusable" Value="false"/>
|
<Setter Property="IsTabStop" Value="false"/>
|
<Setter Property="Opacity" Value="0.2"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
<Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<!--滚动条上下按钮-->
|
<Style x:Key="VerticalScrollBarPageButton2" TargetType="{x:Type RepeatButton}">
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Focusable" Value="false"/>
|
<Setter Property="IsTabStop" Value="false"/>
|
<Setter Property="Opacity" Value="0"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
<Rectangle Fill="#90000000" Width="0" Height="0"/>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
<Style x:Key="for_scrollbar" TargetType="{x:Type ScrollBar}">
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
|
<Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
|
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Margin" Value="0,1,1,6"/>
|
<Setter Property="Width" Value="12"/>
|
<Setter Property="MinWidth" Value="5"/>
|
<Setter Property="Opacity" Value="0.2"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type ScrollBar}">
|
<Grid x:Name="Bg" SnapsToDevicePixels="true">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="auto"></RowDefinition>
|
<RowDefinition Height="*"></RowDefinition>
|
<RowDefinition Height="auto"></RowDefinition>
|
</Grid.RowDefinitions>
|
<RepeatButton Grid.Row="0" Style="{StaticResource VerticalScrollBarPageButton2}" Command="{x:Static ScrollBar.PageUpCommand}"/>
|
<Track x:Name="PART_Track" Grid.Row="1" IsEnabled="{TemplateBinding IsMouseOver}" IsDirectionReversed="true">
|
<Track.DecreaseRepeatButton>
|
<RepeatButton Style="{StaticResource VerticalScrollBarPageButton}" Command="{x:Static ScrollBar.PageUpCommand}"/>
|
</Track.DecreaseRepeatButton>
|
<Track.IncreaseRepeatButton>
|
<RepeatButton Style="{StaticResource VerticalScrollBarPageButton}" Command="{x:Static ScrollBar.PageDownCommand}"/>
|
</Track.IncreaseRepeatButton>
|
<Track.Thumb>
|
<Thumb Style="{StaticResource ScrollBarThumb}"/>
|
</Track.Thumb>
|
</Track>
|
<RepeatButton Grid.Row="2" Style="{StaticResource VerticalScrollBarPageButton2}" Command="{x:Static ScrollBar.PageDownCommand}"/>
|
</Grid>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
<Style.Triggers>
|
<Trigger Property="Orientation" Value="Horizontal">
|
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Margin" Value="1,0,6,1"/>
|
<Setter Property="Height" Value="12"/>
|
<Setter Property="MinHeight" Value="5"/>
|
<Setter Property="Width" Value="Auto"/>
|
<Setter Property="Opacity" Value="0.2"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type ScrollBar}">
|
<Grid x:Name="Bg" SnapsToDevicePixels="true">
|
<Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}">
|
<Track.DecreaseRepeatButton>
|
<RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}" Command="{x:Static ScrollBar.PageLeftCommand}"/>
|
</Track.DecreaseRepeatButton>
|
<Track.IncreaseRepeatButton>
|
<RepeatButton Style="{StaticResource HorizontalScrollBarPageButton}" Command="{x:Static ScrollBar.PageRightCommand}"/>
|
</Track.IncreaseRepeatButton>
|
<Track.Thumb>
|
<Thumb Style="{StaticResource ScrollBarThumb}"/>
|
</Track.Thumb>
|
</Track>
|
</Grid>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
<Style x:Key="for_scrollviewer"
|
TargetType="{x:Type ScrollViewer}">
|
<Setter Property="BorderBrush" Value="LightGray"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
<!--<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
|
<Grid Background="{TemplateBinding Background}">
|
<ScrollContentPresenter Cursor="{TemplateBinding Cursor}" Margin="{TemplateBinding Padding}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
|
<ScrollBar x:Name="PART_VerticalScrollBar"
|
HorizontalAlignment="Right"
|
Maximum="{TemplateBinding ScrollableHeight}"
|
Orientation="Vertical"
|
Style="{StaticResource for_scrollbar}"
|
ViewportSize="{TemplateBinding ViewportHeight}"
|
Value="{TemplateBinding VerticalOffset}"
|
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
|
<ScrollBar x:Name="PART_HorizontalScrollBar"
|
Maximum="{TemplateBinding ScrollableWidth}"
|
Orientation="Horizontal"
|
Style="{StaticResource for_scrollbar}"
|
VerticalAlignment="Bottom"
|
Value="{TemplateBinding HorizontalOffset}"
|
ViewportSize="{TemplateBinding ViewportWidth}"
|
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
|
</Grid>
|
</Border>-->
|
<Grid>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition/>
|
<ColumnDefinition Width="Auto"/>
|
</Grid.ColumnDefinitions>
|
<Grid.RowDefinitions>
|
<RowDefinition/>
|
<RowDefinition Height="Auto"/>
|
</Grid.RowDefinitions>
|
<ScrollContentPresenter Grid.Row="0"
|
Grid.Column="0"
|
Margin="{TemplateBinding Control.Padding}"
|
Content="{TemplateBinding ContentControl.Content}"
|
ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
|
CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}" />
|
<Border Grid.Row="0" Grid.Column="1" Background="White">
|
<ScrollBar x:Name="PART_VerticalScrollBar"
|
|
Value="{TemplateBinding VerticalOffset}"
|
Maximum="{TemplateBinding ScrollableHeight}"
|
ViewportSize="{TemplateBinding ViewportHeight}"
|
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
|
</Border>
|
<ScrollBar x:Name="PART_HorizontalScrollBar"
|
Orientation="Horizontal"
|
Grid.Row="1"
|
Grid.Column="0"
|
Grid.ColumnSpan="1"
|
Value="{TemplateBinding HorizontalOffset}"
|
Maximum="{TemplateBinding ScrollableWidth}"
|
ViewportSize="{TemplateBinding ViewportWidth}"
|
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
|
</Grid>
|
<ControlTemplate.Triggers>
|
<EventTrigger RoutedEvent="ScrollChanged" >
|
<BeginStoryboard>
|
<Storyboard>
|
<DoubleAnimation
|
Storyboard.TargetName="PART_VerticalScrollBar"
|
Storyboard.TargetProperty="Opacity"
|
To="0.8"
|
Duration="0:0:1"/>
|
<DoubleAnimation
|
Storyboard.TargetName="PART_VerticalScrollBar"
|
Storyboard.TargetProperty="Opacity"
|
To="0.2"
|
Duration="0:0:1"
|
BeginTime="0:0:1"/>
|
<DoubleAnimation
|
Storyboard.TargetName="PART_HorizontalScrollBar"
|
Storyboard.TargetProperty="Opacity"
|
To="0.8"
|
Duration="0:0:1"/>
|
<DoubleAnimation
|
Storyboard.TargetName="PART_HorizontalScrollBar"
|
Storyboard.TargetProperty="Opacity"
|
To="0.2"
|
Duration="0:0:1"
|
BeginTime="0:0:1"/>
|
</Storyboard>
|
</BeginStoryboard>
|
</EventTrigger>
|
<EventTrigger RoutedEvent="MouseEnter"
|
SourceName="PART_VerticalScrollBar">
|
<BeginStoryboard>
|
<Storyboard>
|
<DoubleAnimation
|
Storyboard.TargetName="PART_VerticalScrollBar"
|
Storyboard.TargetProperty="Opacity"
|
To="0.8"
|
Duration="0:0:0.7"/>
|
</Storyboard>
|
</BeginStoryboard>
|
</EventTrigger>
|
<EventTrigger RoutedEvent="MouseLeave"
|
SourceName="PART_VerticalScrollBar">
|
<BeginStoryboard>
|
<Storyboard>
|
<DoubleAnimation
|
Storyboard.TargetName="PART_VerticalScrollBar"
|
Storyboard.TargetProperty="Opacity"
|
To="0.2"
|
Duration="0:0:0.7"/>
|
</Storyboard>
|
</BeginStoryboard>
|
</EventTrigger>
|
<EventTrigger RoutedEvent="MouseEnter"
|
SourceName="PART_HorizontalScrollBar">
|
<BeginStoryboard>
|
<Storyboard>
|
<DoubleAnimation
|
Storyboard.TargetName="PART_HorizontalScrollBar"
|
Storyboard.TargetProperty="Opacity"
|
To="0.8"
|
Duration="0:0:0.7"/>
|
</Storyboard>
|
</BeginStoryboard>
|
</EventTrigger>
|
<EventTrigger RoutedEvent="MouseLeave"
|
SourceName="PART_HorizontalScrollBar">
|
<BeginStoryboard>
|
<Storyboard>
|
<DoubleAnimation
|
Storyboard.TargetName="PART_HorizontalScrollBar"
|
Storyboard.TargetProperty="Opacity"
|
To="0.2"
|
Duration="0:0:0.7"/>
|
</Storyboard>
|
</BeginStoryboard>
|
</EventTrigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<!--默认ScrollBar-->
|
<Style TargetType="ScrollBar" BasedOn="{StaticResource for_scrollbar}"/>
|
|
<!--默认ScrollView-->
|
<Style TargetType="ScrollViewer" BasedOn="{StaticResource for_scrollviewer}"/>
|
<!--#endregion-->
|
|
|
|
<!--#region TextBox Style-->
|
<Style TargetType="TextBox">
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate >
|
<Grid>
|
<Border x:Name="BackBorder" SnapsToDevicePixels="true" Background="{TemplateBinding Background}"
|
BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
</Border>
|
</Grid>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsFocused" Value="True" >
|
<Setter Property="Background" TargetName="BackBorder" Value="#FFE5E6EB"/>
|
</Trigger>
|
<Trigger Property="IsEnabled" Value="False">
|
<Setter Property="TextBox.Foreground" Value="Gray"/>
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
<!--#endregion-->
|
|
<!--#region CheckBox Style-->
|
<Style TargetType="{x:Type CheckBox}">
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
<Setter Property="Background" Value="White"/>
|
<Setter Property="BorderBrush" Value="#FF616467"/>
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type CheckBox}">
|
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
<Border x:Name="checkBoxBorder" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
Width="20" Height="20" BorderBrush="#FF616467" BorderThickness="1" CornerRadius="5">
|
<Grid x:Name="markGrid">
|
<!--<Rectangle x:Name="line1" Fill="#FF19939D" Opacity="0" Height="2" Width="{TemplateBinding Width}" VerticalAlignment="Top"/>
|
<Rectangle x:Name="line2" Fill="#FF19939D" Opacity="0" Height="{TemplateBinding Height}" Width="2" HorizontalAlignment="Left"/>-->
|
<!--<Path x:Name="optionMark" Data="F1M17,5L9,16 2,10 5,8 8,11 15,2 z" Fill="White" Margin="4" Opacity="0" Stretch="Uniform"/>-->
|
<Path x:Name="optionMark" Data="M5,5 L15,18 L38,0" Stroke="White" StrokeThickness="2" Margin="4" Opacity="0" Stretch="Uniform"/>
|
<!--<Rectangle x:Name="indeterminateMark" Fill="#FFFF8C59" Opacity="0"/>-->
|
</Grid>
|
</Border>
|
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}"
|
Grid.Column="1" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False"
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="5,0,0,0"
|
RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
</Grid>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsChecked" Value="True">
|
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="Transparent"/>
|
<Setter Property="Background" TargetName="checkBoxBorder" Value="#FF0E81EC"/>
|
|
<Setter Property="Opacity" TargetName="optionMark" Value="1"/>
|
<!--<Setter Property="Opacity" TargetName="indeterminateMark" Value="0"/>-->
|
</Trigger>
|
<Trigger Property="IsChecked" Value="{x:Null}">
|
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="#FFC6CBD0"/>
|
<Setter Property="Opacity" TargetName="optionMark" Value="0"/>
|
<!--<Setter Property="Opacity" TargetName="indeterminateMark" Value="0"/>-->
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
<!--#endregion-->
|
|
<Style TargetType="{x:Type UserControl}" x:Key="UCStyle">
|
<Setter Property="Background" Value="#70000000" />
|
</Style>
|
|
|
</ResourceDictionary>
|