<ResourceDictionary
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:ctrls="clr-namespace:XHandler.Controls"
|
xmlns:cls="clr-namespace:XHandler.Class"
|
xmlns:fv="clr-namespace:XHandler.Controls.FlipView"
|
xmlns:draw="clr-namespace:XHandler.Controls.DrawCanvas">
|
|
<!--ImageButton-->
|
<ControlTemplate x:Key="ImageButtonTemplate" TargetType="{x:Type ctrls:ImageButton}">
|
<Grid x:Name="Grid">
|
<Border x:Name="Background" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
|
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0" Visibility="Visible"/>
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="auto"/>
|
</Grid.RowDefinitions>
|
<Image Grid.Row="0" x:Name="normalImage" Source="{TemplateBinding NormalImage}" Width="{TemplateBinding ImageWidth}" Height="{TemplateBinding ImageHeight}" VerticalAlignment="Center" Opacity="1"/>
|
<Image Grid.Row="0" x:Name="disableImage" Source="{TemplateBinding DisabledImage}" Width="{TemplateBinding ImageWidth}" Height="{TemplateBinding ImageHeight}" VerticalAlignment="Center" Opacity="0"/>
|
|
<ContentPresenter Grid.Row="1" x:Name="idContent" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}"
|
VerticalAlignment="Top" RecognizesAccessKey="True"/>
|
</Grid>
|
</Grid>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsMouseOver" Value="true">
|
<Setter Property="Background" TargetName="Background" Value="#20000000"/>
|
</Trigger>
|
<Trigger Property="IsPressed" Value="true">
|
<Setter Property="Background" TargetName="Background" Value="#30000000"/>
|
</Trigger>
|
<Trigger Property="IsEnabled" Value="false">
|
<Setter Property="Opacity" TargetName="disableImage" Value="1"/>
|
<Setter Property="Opacity" TargetName="normalImage" Value="0"/>
|
<Setter Property="TextElement.Foreground" TargetName="idContent" Value="#FFA3A7B0"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
|
<Style TargetType="{x:Type ctrls:ImageButton}">
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
<Setter Property="FontSize" Value="16"/>
|
<Setter Property="FontFamily" Value="微软雅黑"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
<Setter Property="Template" Value="{StaticResource ImageButtonTemplate}" />
|
</Style>
|
|
<!--ImageToggleButton-->
|
<Style TargetType="{x:Type ctrls:ImageToggleButton}">
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
<Setter Property="FontSize" Value="16"/>
|
<Setter Property="FontFamily" Value="微软雅黑"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type ctrls:ImageToggleButton}">
|
<Grid x:Name="Grid">
|
<Border x:Name="Background" Background="{TemplateBinding Background}"
|
BorderThickness="0" CornerRadius="8"/>
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="30"/>
|
</Grid.RowDefinitions>
|
<Image Grid.Row="0" x:Name="ButtonImage" Source="{Binding NormalImage, RelativeSource={RelativeSource TemplatedParent}}" Width="31" Height="31"
|
VerticalAlignment="Bottom"/>
|
<ContentPresenter Grid.Row="1" x:Name="idContent" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}"
|
VerticalAlignment="Center" RecognizesAccessKey="True"/>
|
</Grid>
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsMouseOver" Value="true">
|
<Setter Property="Background" TargetName="Background" Value="#50FFFFFF"/>
|
</Trigger>
|
<Trigger Property="IsPressed" Value="true">
|
<Setter Property="Background" TargetName="Background" Value="#80FFFFFF"/>
|
</Trigger>
|
<Trigger Property="ToggleButton.IsChecked" Value="true">
|
<Setter TargetName="ButtonImage" Property="Source" Value="{Binding SelectedImage, RelativeSource={RelativeSource TemplatedParent}}" />
|
<Setter Property="TextElement.Foreground" TargetName="idContent" Value="#FFFABD00"/>
|
<Setter Property="Background" TargetName="Background" Value="White"/>
|
</Trigger>
|
<Trigger Property="IsEnabled" Value="false">
|
<Setter TargetName="ButtonImage" Property="Source" Value="{Binding DisabledImage, RelativeSource={RelativeSource TemplatedParent}}" />
|
<Setter Property="TextElement.Foreground" TargetName="idContent" Value="#FFA3A7B0"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<!--MenuButton-->
|
<ControlTemplate x:Key="MenuButtonTemplate" TargetType="{x:Type ctrls:MenuButton}">
|
<Grid x:Name="Grid">
|
<Border x:Name="Background" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
|
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8,8,0,0" Visibility="Visible"/>
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="auto"/>
|
</Grid.RowDefinitions>
|
<Image Grid.Row="0" x:Name="normalImage" Source="{TemplateBinding NormalImage}" Width="{TemplateBinding ImageWidth}" Height="{TemplateBinding ImageHeight}" VerticalAlignment="Bottom" Opacity="1"/>
|
<Image Grid.Row="0" x:Name="disableImage" Source="{TemplateBinding DisabledImage}" Width="{TemplateBinding ImageWidth}" Height="{TemplateBinding ImageHeight}" VerticalAlignment="Bottom" Opacity="0"/>
|
<Image Grid.Row="0" x:Name="pressImage" Source="{TemplateBinding PressImage}" Width="{TemplateBinding ImageWidth}" Height="{TemplateBinding ImageHeight}" VerticalAlignment="Bottom" Opacity="0"/>
|
|
<ContentPresenter Grid.Row="1" x:Name="idContent" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}"
|
VerticalAlignment="Center" RecognizesAccessKey="True"/>
|
</Grid>
|
</Grid>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsMouseOver" Value="true">
|
<Setter Property="Background" TargetName="Background" Value="#20FFFFFF"/>
|
</Trigger>
|
<Trigger Property="IsPressed" Value="true">
|
<Setter Property="TextElement.Foreground" TargetName="idContent" Value="#FFFABD00"/>
|
<Setter Property="Background" TargetName="Background" Value="#FFEEF1F5"/>
|
<Setter Property="Opacity" TargetName="normalImage" Value="0"/>
|
<Setter Property="Opacity" TargetName="pressImage" Value="1"/>
|
</Trigger>
|
<Trigger Property="IsEnabled" Value="false">
|
<Setter Property="Opacity" TargetName="disableImage" Value="1"/>
|
<Setter Property="Opacity" TargetName="normalImage" Value="0"/>
|
<Setter Property="TextElement.Foreground" TargetName="idContent" Value="#FFA3A7B0"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
|
<Style TargetType="{x:Type ctrls:MenuButton}">
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
<Setter Property="FontSize" Value="16"/>
|
<Setter Property="FontFamily" Value="微软雅黑"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
<Setter Property="Template" Value="{StaticResource MenuButtonTemplate}" />
|
</Style>
|
|
<!--SearchTextBox-->
|
<Style TargetType="{x:Type ctrls:SearchTextBox}">
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type ctrls:SearchTextBox}">
|
<Grid Background="{TemplateBinding Background}">
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="50"/>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="30"/>
|
</Grid.ColumnDefinitions>
|
<Image Grid.Column="0" Source="/Assets/search.png" Width="18" Height="18"/>
|
<!--<Button Grid.Column="0" Width="20" Height="20" x:Name="PART_ContentHostSeachButton" Margin="0 10 0 0" >
|
<Button.Template>
|
<ControlTemplate TargetType="{x:Type Button}">
|
<Grid>
|
<Border Width="12" Height="12" x:Name="bg" Background="{TemplateBinding Background}" CornerRadius="8" VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
<Path Name="searchPath" Stretch="Fill" Fill="Gray"
|
Data="F1 M 42.5,22C 49.4036,22 55,27.5964 55,34.5C 55,41.4036 49.4036,47 42.5,47C 40.1356,47 37.9245,46.3435 36,45.2426L 26.9749,54.2678C 25.8033,55.4393 23.9038,55.4393 22.7322,54.2678C 21.5607,53.0962 21.5607,51.1967 22.7322,50.0251L 31.7971,40.961C 30.6565,39.0755 30,36.8644 30,34.5C 30,27.5964 35.5964,22 42.5,22 Z M 42.5,26C 37.8056,26 34,29.8056 34,34.5C 34,39.1944 37.8056,43 42.5,43C 47.1944,43 51,39.1944 51,34.5C 51,29.8056 47.1944,26 42.5,26 Z ">
|
<Path.RenderTransform>
|
<RotateTransform Angle="-90" CenterX="8" CenterY="8" />
|
</Path.RenderTransform>
|
</Path>
|
</Grid>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsPressed" Value="True">
|
<Setter Property="Background" TargetName="bg" Value="#FFC0C1C3"/>
|
<Setter Property="UIElement.Effect" >
|
<Setter.Value>
|
<DropShadowEffect BlurRadius="10" Color="Black" Direction="0" Opacity="0.6" RenderingBias="Performance" ShadowDepth="0" />
|
</Setter.Value>
|
</Setter>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Button.Template>
|
</Button>-->
|
<Grid Grid.Column="1">
|
<Border x:Name="BackBorder" SnapsToDevicePixels="true" Background="{TemplateBinding Background}"
|
BorderThickness="0" BorderBrush="{TemplateBinding BorderBrush}">
|
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
</Border>
|
|
<TextBlock x:Name="tbWatermark"
|
Padding="2,0"
|
Margin="{TemplateBinding Padding}"
|
Foreground="{TemplateBinding Foreground}"
|
FontSize="{TemplateBinding FontSize}"
|
TextWrapping="Wrap"
|
Focusable="False"
|
IsHitTestVisible="False"
|
Visibility="Collapsed"
|
Text="{Binding Path=Watermark,RelativeSource={RelativeSource AncestorType=TextBox}, Mode=OneWay}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
Opacity="0.3" />
|
</Grid>
|
<Button Grid.Column="2" Width="20" Height="20" DockPanel.Dock="Right" x:Name="PART_ContentHostClearButton" Visibility="Visible" Background="{TemplateBinding Background}">
|
<Button.Template>
|
<ControlTemplate TargetType="{x:Type Button}">
|
<Border x:Name="PART_Border" BorderBrush="Transparent" BorderThickness="0" Padding="2" Background="{TemplateBinding Background}">
|
<Path x:Name="PART_Path" Data="M6,6 L6,6 10,10 M10,6 L10,6 6,10" Fill="Gray" Stretch="Fill" Stroke="Gray" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
</Border>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<!--<Setter Property="Background" TargetName="PART_Border">
|
<Setter.Value>
|
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
|
<GradientStop Color="Silver" Offset="0.0" />
|
<GradientStop Color="White" Offset="0.5" />
|
<GradientStop Color="Silver" Offset="0.0" />
|
</LinearGradientBrush>
|
</Setter.Value>
|
</Setter>-->
|
<Setter Property="Stroke" TargetName="PART_Path" Value="Black"/>
|
</Trigger>
|
<Trigger Property="IsPressed" Value="True">
|
<Setter Property="Opacity" TargetName="PART_Path" Value="0.5"/>
|
<!--<Setter Property="UIElement.Effect">
|
<Setter.Value>
|
<DropShadowEffect BlurRadius="10" Color="Black" Direction="0" Opacity="0.6" RenderingBias="Performance" ShadowDepth="0" />
|
</Setter.Value>
|
</Setter>-->
|
</Trigger>
|
<Trigger Property="IsFocused" Value="True" />
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Button.Template>
|
</Button>
|
|
</Grid>
|
<ControlTemplate.Triggers>
|
<DataTrigger Binding="{Binding Text,RelativeSource={RelativeSource Self}}" Value="">
|
<Setter Property="Visibility" TargetName="tbWatermark" Value="Visible" />
|
<Setter Property="Visibility" TargetName="PART_ContentHostClearButton" Value="Collapsed"/>
|
</DataTrigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<!--ImageRadioButton-->
|
<ControlTemplate x:Key="ImageRadioButtonTemplate" TargetType="{x:Type ctrls:ImageRadioButton}">
|
|
<Grid>
|
<Border x:Name="Background" Background="{TemplateBinding Background}"
|
BorderThickness="0" CornerRadius="8"/>
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="30"/>
|
</Grid.RowDefinitions>
|
<Image Grid.Row="0" x:Name="idImage" Source="{Binding UnCheckImage, RelativeSource={RelativeSource TemplatedParent}}" Width="{TemplateBinding ImageWidth}"
|
Height="{TemplateBinding ImageHeight}" VerticalAlignment="Bottom" Visibility="Visible"/>
|
<TextBlock Grid.Row="1" x:Name="idContent" Text="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
VerticalAlignment="Center" TextWrapping="Wrap"/>
|
</Grid>
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsChecked" Value="true">
|
<Setter TargetName="idImage" Property="Source" Value="{Binding CheckImage, RelativeSource={RelativeSource TemplatedParent}}" />
|
<Setter Property="TextElement.Foreground" TargetName="idContent" Value="#FFFABD00"/>
|
<Setter Property="Background" TargetName="Background" Value="White"/>
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
<Setter TargetName="idContent" Property="TextElement.Foreground" Value="LightGray"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
|
<Style TargetType="{x:Type ctrls:ImageRadioButton}">
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
<Setter Property="FontSize" Value="16"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
<Setter Property="Template" Value="{StaticResource ImageRadioButtonTemplate}" />
|
</Style>
|
|
|
<Style TargetType="{x:Type ctrls:PromptTextBox}">
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type ctrls:PromptTextBox}">
|
<Grid Background="{TemplateBinding Background}">
|
<Border x:Name="BackBorder" SnapsToDevicePixels="true" Background="{TemplateBinding Background}"
|
BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
</Border>
|
|
<TextBlock x:Name="tbWatermark"
|
Padding="2,0"
|
Margin="{TemplateBinding Padding}"
|
Foreground="#909090"
|
FontSize="{TemplateBinding FontSize}"
|
TextWrapping="Wrap"
|
Focusable="False"
|
IsHitTestVisible="False"
|
Visibility="Collapsed"
|
Text="{Binding Path=Watermark,RelativeSource={RelativeSource AncestorType=TextBox}, Mode=OneWay}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
Opacity="1" />
|
</Grid>
|
<ControlTemplate.Triggers>
|
<DataTrigger Binding="{Binding Text,RelativeSource={RelativeSource Self}}" Value="">
|
<Setter Property="Visibility" TargetName="tbWatermark" Value="Visible" />
|
</DataTrigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<PathGeometry x:Key="Icon_Gou" Figures="M378.410667 850.450963C364.491852 850.450963 350.610963 845.293037 340.02963 834.939259L20.920889 523.529481C-0.279704 502.821926-0.279704 469.295407 20.920889 448.587852 42.121481 427.880296 76.48237 427.880296 97.682963 448.587852L378.410667 722.526815 925.75763 188.491852C946.958222 167.784296 981.319111 167.784296 1002.519704 188.491852 1023.720296 209.161481 1023.720296 242.688 1002.519704 263.395556L416.791704 834.939259C406.172444 845.293037 392.291556 850.450963 378.410667 850.450963L378.410667 850.450963Z" />
|
|
<cls:IsLastItemConverter x:Key="IsLastItemConverter" />
|
<Style TargetType="{x:Type ctrls:StepBarItem}">
|
<Setter Property="FontWeight" Value="Bold" />
|
<Setter Property="FontSize" Value="16" />
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type ctrls:StepBarItem}">
|
<Grid>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="auto" />
|
<ColumnDefinition Width="*" />
|
</Grid.ColumnDefinitions>
|
<StackPanel Orientation="Horizontal">
|
<Grid Margin="0,0,10,0">
|
<Border x:Name="Bd" BorderBrush="LightGray" Width="25" Height="25" CornerRadius="100"
|
BorderThickness="1" SnapsToDevicePixels="True" UseLayoutRounding="True">
|
</Border>
|
<TextBlock x:Name="Number" Text="{TemplateBinding Number}"
|
HorizontalAlignment="Center" VerticalAlignment="Center" />
|
<Path x:Name="path" Data="{StaticResource Icon_Gou}" Stretch="Uniform" Width="12" Fill="#3399FF" Visibility="Collapsed" />
|
</Grid>
|
<ContentPresenter VerticalAlignment="Center" />
|
|
</StackPanel>
|
<Border x:Name="Line" Grid.Column="1" BorderBrush="LightGray" BorderThickness="0,1,0,0"
|
VerticalAlignment="Center" Margin="10,0"
|
SnapsToDevicePixels="True" UseLayoutRounding="True" />
|
</Grid>
|
<ControlTemplate.Triggers>
|
<DataTrigger Value="True">
|
<DataTrigger.Binding>
|
<MultiBinding Converter="{StaticResource IsLastItemConverter}">
|
<Binding RelativeSource="{RelativeSource Self}" />
|
<Binding RelativeSource="{RelativeSource AncestorType={x:Type ctrls:StepBar}}" Path="Items.Count"/>
|
</MultiBinding>
|
</DataTrigger.Binding>
|
<Setter TargetName="Line" Property="Visibility" Value="Collapsed" />
|
</DataTrigger>
|
<DataTrigger Value="False">
|
<DataTrigger.Binding>
|
<MultiBinding Converter="{StaticResource IsLastItemConverter}">
|
<Binding RelativeSource="{RelativeSource Self}" />
|
<Binding RelativeSource="{RelativeSource AncestorType={x:Type ctrls:StepBar}}" Path="Items.Count"/>
|
</MultiBinding>
|
</DataTrigger.Binding>
|
<Setter TargetName="Line" Property="Visibility" Value="Visible" />
|
</DataTrigger>
|
<Trigger Property="State" Value="Complete">
|
<Setter TargetName="Bd" Property="Background" Value="#003399FF" />
|
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource blueBrush}" />
|
<Setter TargetName="Number" Property="Visibility" Value="Collapsed" />
|
<Setter TargetName="Line" Property="BorderBrush" Value="{DynamicResource blueBrush}" />
|
<Setter TargetName="path" Property="Visibility" Value="Visible" />
|
<!--<Setter Property="Foreground" Value="#999999" />-->
|
</Trigger>
|
<Trigger Property="State" Value="Busy">
|
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource blueBrush}" />
|
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource blueBrush}" />
|
<Setter TargetName="Number" Property="Visibility" Value="Visible" />
|
<Setter TargetName="Number" Property="Foreground" Value="#FFFFFF" />
|
<Setter TargetName="path" Property="Visibility" Value="Collapsed" />
|
<!--<Setter Property="Foreground" Value="#666666" />-->
|
</Trigger>
|
<!--<DataTrigger Value="Large">
|
<DataTrigger.Binding>
|
<MultiBinding Converter="{StaticResource IsProgressedConverter}">
|
<Binding RelativeSource="{RelativeSource Self}" />
|
<Binding RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" Path="Progress"/>
|
</MultiBinding>
|
</DataTrigger.Binding>
|
<Setter Property="Foreground" Value="#999999" />
|
</DataTrigger>-->
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style TargetType="{x:Type ctrls:StepBar}">
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type ctrls:StepBar}">
|
<Border>
|
<ItemsPresenter />
|
</Border>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
<Setter Property="ItemsPanel">
|
<Setter.Value>
|
<ItemsPanelTemplate>
|
<UniformGrid IsItemsHost="True" Rows="1" />
|
</ItemsPanelTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
|
<ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
|
<Border Name="MyBorder"
|
Background="{TemplateBinding Background}"
|
BorderThickness="0"
|
BorderBrush="{TemplateBinding BorderBrush}">
|
<Path Name="MyPath"
|
StrokeThickness="2"
|
Stroke="Gray"
|
Height="8"
|
Width="15"
|
Data="M0,0 L6,5 L12,0"
|
Stretch="Fill">
|
</Path>
|
</Border>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter TargetName="MyBorder" Property="Opacity" Value="0.6"></Setter>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
|
<Style x:Key="mcbCheckboxStyle" TargetType="{x:Type CheckBox}">
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
<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>
|
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}"
|
ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False"
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="5,0"
|
RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
<Border x:Name="checkBoxBorder" Grid.Column="1" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
Width="20" Height="20" BorderBrush="#FF616467" BorderThickness="0" 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,15 M5,15 L15,5" Stroke="Gray" StrokeThickness="2" Margin="4" Opacity="1" Stretch="Uniform"/>
|
<!--<Rectangle x:Name="indeterminateMark" Fill="#FFFF8C59" Opacity="0"/>-->
|
</Grid>
|
</Border>
|
</Grid>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsChecked" Value="True">
|
<Setter Property="Opacity" TargetName="optionMark" Value="0.5"/>
|
<!--<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>
|
|
<!--MultiComboBox普通样式-->
|
<Style TargetType="{x:Type ctrls:MultiComboBox}">
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
<Setter Property="MaxDropDownHeight" Value="400" />
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type ctrls:MultiComboBox}">
|
<Grid>
|
<Border x:Name="Bg" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderBrush="#eaeaea" BorderThickness="0"
|
Background="{TemplateBinding Background}">
|
<Grid x:Name="PART_Root">
|
<Grid x:Name="PART_InnerGrid" Margin="0">
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="0.3*" MaxWidth="30" />
|
</Grid.ColumnDefinitions>
|
<ListBox x:Name="PART_ListBoxChk" SelectionMode="Multiple" BorderThickness="0" ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
Background="{TemplateBinding Background}">
|
<ListBox.ItemsPanel>
|
<ItemsPanelTemplate>
|
<VirtualizingStackPanel Orientation="Horizontal" VirtualizingStackPanel.IsVirtualizing="True" />
|
</ItemsPanelTemplate>
|
</ListBox.ItemsPanel>
|
<ListBox.Template>
|
|
<ControlTemplate TargetType="{x:Type ListBox}">
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="1" SnapsToDevicePixels="true">
|
<ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}" >
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
</ScrollViewer>
|
</Border>
|
<!--<ControlTemplate.Triggers>
|
<Trigger Property="IsEnabled" Value="false">
|
<Setter Property="Background" TargetName="Bd" Value="{StaticResource ListBox.Disabled.Background}"/>
|
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource ListBox.Disabled.Border}"/>
|
</Trigger>
|
<MultiTrigger>
|
<MultiTrigger.Conditions>
|
<Condition Property="IsGrouping" Value="true"/>
|
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
|
</MultiTrigger.Conditions>
|
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
|
</MultiTrigger>
|
</ControlTemplate.Triggers>-->
|
</ControlTemplate>
|
|
</ListBox.Template>
|
<ListBox.ItemContainerStyle>
|
<Style TargetType="ListBoxItem">
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="IsSelected" Value="True"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="ListBoxItem">
|
<CheckBox BorderThickness="0" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{Binding ViewName}" IsChecked="{Binding Path=IsSelected,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
Style="{DynamicResource mcbCheckboxStyle}" FontSize="16" Background="{TemplateBinding Background}"/>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
</ListBox.ItemContainerStyle>
|
</ListBox>
|
|
<!--下拉按钮-->
|
<ToggleButton x:Name="PART_DropDownToggle" IsTabStop="False" Background="{TemplateBinding Background}"
|
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
Grid.Column="1" Template="{StaticResource ComboBoxToggleButton}" />
|
</Grid>
|
</Grid>
|
</Border>
|
<!--弹出多选列表-->
|
<Popup x:Name="PART_Popup" AllowsTransparency="True" Focusable="False" StaysOpen="False"
|
IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
|
PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
<Grid Width="{Binding ActualWidth, RelativeSource={RelativeSource TemplatedParent}}" MaxHeight="{Binding MaxDropDownHeight, RelativeSource={RelativeSource TemplatedParent}}" >
|
<ListBox x:Name="PART_ListBox" SelectionMode="Multiple" BorderThickness="1 0 1 1" Background="White" ItemsSource="{Binding ItemsSource,RelativeSource={RelativeSource TemplatedParent}}"
|
MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="#eaeaea" >
|
<ListBox.ItemContainerStyle>
|
<Style TargetType="ListBoxItem">
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type ListBoxItem}" >
|
<Grid Height="30">
|
<Border x:Name="bg" BorderBrush="#eaeaea" BorderThickness="0"/>
|
<ContentPresenter x:Name="content" />
|
<Border Background="White" Opacity="0"/>
|
</Grid>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsSelected" Value="True">
|
<Setter TargetName="bg" Property="Background" Value="{DynamicResource listSelectedBrush}" />
|
</Trigger>
|
<MultiTrigger>
|
<MultiTrigger.Conditions>
|
<Condition Property="IsMouseOver" Value="true" />
|
<Condition Property="IsSelected" Value="false"/>
|
</MultiTrigger.Conditions>
|
<Setter TargetName="bg" Property="Background" Value="{DynamicResource blueBrush}" />
|
<Setter TargetName="bg" Property="Opacity" Value="0.7"/>
|
<Setter Property="Foreground" Value="White" />
|
</MultiTrigger>
|
<Trigger Property="IsEnabled" Value="False">
|
<Setter TargetName="bg" Property="Opacity" Value="0.3" />
|
<Setter Property="Foreground" Value="Gray" />
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
</ListBox.ItemContainerStyle>
|
<ListBox.ItemTemplate>
|
<DataTemplate>
|
<Grid >
|
<CheckBox x:Name="chk" Visibility="Hidden" IsChecked="{Binding IsCheck,Mode=TwoWay}" VerticalAlignment="Center"/>
|
<CheckBox VerticalAlignment="Center" Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=ListBoxItem}}" IsChecked="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,Mode=TwoWay}" Content="{Binding Path=ViewName}" />
|
<!--<CheckBox x:Name="chk" VerticalAlignment="Center" Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=ListBoxItem}}"
|
IsChecked="{Binding IsCheck,Mode=TwoWay}" Content="{Binding Path=ViewName}" FontSize="16"/>-->
|
</Grid>
|
<DataTemplate.Triggers>
|
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="true">
|
<Setter TargetName="chk" Property="IsChecked" Value="true"/>
|
</DataTrigger>
|
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="false">
|
<Setter TargetName="chk" Property="IsChecked" Value="false"/>
|
</DataTrigger>
|
</DataTemplate.Triggers>
|
</DataTemplate>
|
</ListBox.ItemTemplate>
|
</ListBox>
|
</Grid>
|
</Popup>
|
</Grid>
|
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<Style TargetType="{x:Type draw:DrawingCanvasViewer}">
|
<Setter Property="ScrollViewer.CanContentScroll" Value="False" />
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
<Setter Property="ScrollViewer.HorizontalContentAlignment" Value="Stretch" />
|
<Setter Property="ScrollViewer.VerticalContentAlignment" Value="Stretch" />
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type draw:DrawingCanvasViewer}">
|
<ScrollViewer x:Name="Part_ScrollViewer" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalContentAlignment}"
|
CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
|
HorizontalContentAlignment="{TemplateBinding ScrollViewer.HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding ScrollViewer.VerticalContentAlignment}">
|
<Border Width="{TemplateBinding InnerWidth}" Height="{TemplateBinding InnerHeight}">
|
<Border Width="{TemplateBinding ImageWidth}" Height="{TemplateBinding ImageHeight}">
|
<Border.Background>
|
<ImageBrush ImageSource="{Binding BackgroundImage,RelativeSource={RelativeSource TemplatedParent}}" Stretch="Uniform" />
|
</Border.Background>
|
<Viewbox>
|
<ContentPresenter Width="{Binding BackgroundImage.Width,RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding BackgroundImage.Height,RelativeSource={RelativeSource TemplatedParent}}"
|
Content="{TemplateBinding DrawingCanvas}" />
|
</Viewbox>
|
</Border>
|
</Border>
|
</ScrollViewer>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
|
<Style x:Key="NavigationButtonStyle" TargetType="{x:Type RepeatButton}">
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
<Setter Property="Foreground" Value="#FF636161" />
|
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="Padding" Value="1" />
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
<Grid>
|
<Border x:Name="border"
|
SnapsToDevicePixels="true"
|
Background="White"
|
Opacity="0.79" />
|
<ContentPresenter x:Name="contentPresenter"
|
Focusable="False"
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
Margin="{TemplateBinding Padding}"
|
RecognizesAccessKey="True"
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
</Grid>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsMouseOver"
|
Value="true">
|
<Setter Property="Background"
|
TargetName="border"
|
Value="#FFCDCBCB" />
|
</Trigger>
|
<Trigger Property="IsPressed"
|
Value="true">
|
<Setter Property="Background"
|
TargetName="border"
|
Value="#FF272727" />
|
<Setter Property="TextElement.Foreground"
|
Value="White" />
|
</Trigger>
|
<Trigger Property="IsEnabled"
|
Value="false">
|
<Setter Property="Visibility"
|
Value="Collapsed" />
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
<Setter Property="Width" Value="40" />
|
<Setter Property="Height" Value="80" />
|
</Style>
|
|
|
<Style TargetType="{x:Type fv:FlipView}">
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type fv:FlipView}">
|
<Border Background="{TemplateBinding Background}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderThickness="{TemplateBinding BorderThickness}">
|
<Grid ClipToBounds="True"
|
x:Name="PART_Container">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="20"/>
|
</Grid.RowDefinitions>
|
<!--<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>-->
|
<fv:FlipViewPanel x:Name="PART_Root" Margin="0 0"
|
IsManipulationEnabled="True"
|
Background="Transparent">
|
<ContentControl x:Name="PART_PreviousItem"
|
ContentTemplate="{Binding ItemTemplate, RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentControl x:Name="PART_NextItem"
|
ContentTemplate="{Binding ItemTemplate, RelativeSource={RelativeSource TemplatedParent}}" />
|
<ContentControl x:Name="PART_CurrentItem"
|
ContentTemplate="{Binding ItemTemplate, RelativeSource={RelativeSource TemplatedParent}}" />
|
</fv:FlipViewPanel>
|
<Grid VerticalAlignment="Center" Margin="0 0"
|
x:Name="PART_ButtonPanel"
|
Visibility="Visible">
|
<RepeatButton x:Name="PART_NextButton"
|
FontFamily="Segoe UI Symbol"
|
Content="»"
|
FontSize="40"
|
Style="{DynamicResource NavigationButtonStyle}"
|
Command="{x:Static fv:FlipView.NextCommand}"
|
HorizontalAlignment="Right" />
|
<RepeatButton x:Name="PART_PreviousButton"
|
FontFamily="Segoe UI Symbol"
|
Content="«"
|
FontSize="40"
|
Style="{DynamicResource NavigationButtonStyle}"
|
Command="{x:Static fv:FlipView.PreviousCommand}"
|
HorizontalAlignment="Left" />
|
</Grid>
|
<Grid Grid.Row="1">
|
<ListBox x:Name="PART_ListBox" ScrollViewer.HorizontalScrollBarVisibility="Hidden" BorderThickness="0">
|
<ListBox.ItemsPanel>
|
<ItemsPanelTemplate>
|
<WrapPanel Width="{Binding ActualWidth,RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"/>
|
</ItemsPanelTemplate>
|
</ListBox.ItemsPanel>
|
<ListBox.ItemContainerStyle>
|
<Style TargetType="ListBoxItem">
|
<Setter Property="IsHitTestVisible" Value="False"/>
|
<!-- 设置控件模板 -->
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="ListBoxItem">
|
<!--<Border Background="White" BorderThickness="2" BorderBrush="Blue" CornerRadius="5" Width="20" Height="20">-->
|
<!--<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
TextBlock.Foreground="{TemplateBinding Foreground}"/>-->
|
<!--</Border>-->
|
<Ellipse x:Name="ellipse" Width="15" Height="15" Fill="White" StrokeThickness="1" Stroke="Gray" Margin="5 0"/>
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsSelected" Value="true">
|
<Setter Property="Fill" TargetName="ellipse" Value="{DynamicResource blueBrush}"/>
|
<Setter Property="Stroke" TargetName="ellipse" Value="{DynamicResource blueBrush}"/>
|
<!--<Setter Property="Foreground" Value="White"/>-->
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
</ListBox.ItemContainerStyle>
|
|
</ListBox>
|
</Grid>
|
</Grid>
|
</Border>
|
<ControlTemplate.Triggers>
|
<MultiTrigger>
|
<MultiTrigger.Conditions>
|
<Condition Property="IsMouseOver"
|
Value="True" />
|
<Condition Property="IsStylusOver"
|
Value="False" />
|
</MultiTrigger.Conditions>
|
<Setter Property="Visibility"
|
Value="Visible"
|
TargetName="PART_ButtonPanel" />
|
</MultiTrigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
</ResourceDictionary>
|