update to v1.4.0

This commit is contained in:
NaBian committed 2018-10-27 20:01:47 +08:00
1 parent ca0c8ce7a0
commit 9bc1208484
125 files changed
+891 -483

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
namespace HandyControl.Data.Enum
{
public enum SkinType
{
Default = 0,
Dark
}
}
+20 -3
View File
@@ -60,6 +60,7 @@
<Compile Include="Controls\Loading\LoadingCircle.cs" />
<Compile Include="Controls\Loading\LoadingLine.cs" />
<Compile Include="Data\Enum\InfoType.cs" />
<Compile Include="Data\Enum\SkinType.cs" />
<Compile Include="Data\GrowlInfo.cs" />
<Compile Include="Data\ResourceToken.cs">
<AutoGen>True</AutoGen>
@@ -163,7 +164,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Basic\Colors.xaml">
<Page Include="Themes\Basic\Colors\Colors.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -175,6 +176,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Basic\Colors\ColorsDark.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Basic\Fonts.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -331,6 +336,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Styles\Image.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Styles\ListBox.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -367,7 +376,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Styles\Steps.xaml">
<Page Include="Themes\Styles\StepBar.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -415,7 +424,15 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\ThemesDefault.xaml">
<Page Include="Themes\Theme.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\SkinDark.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\SkinDefault.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+1 -1
View File
@@ -10,4 +10,4 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1.3.4.*")]
[assembly: AssemblyVersion("1.4.0.*")]
-1
View File
@@ -2,7 +2,6 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Colors.xaml"/>
<ResourceDictionary Source="../Basic/Brushes.xaml"/>
<ResourceDictionary Source="../Basic/Converters.xaml"/>
<ResourceDictionary Source="../Basic/Effects.xaml"/>
+8
View File
@@ -10,11 +10,19 @@
<SolidColorBrush x:Key="PrimaryTextBrush" Color="{DynamicResource PrimaryTextColor}"/>
<SolidColorBrush x:Key="SecondaryTextBrush" Color="{DynamicResource SecondaryTextColor}"/>
<SolidColorBrush x:Key="ThirdlyTextBrush" Color="{DynamicResource ThirdlyTextColor}"/>
<SolidColorBrush x:Key="ReverseTextBrush" Color="{DynamicResource ReverseTextColor}"/>
<SolidColorBrush x:Key="TextIconBrush" Color="{DynamicResource TextIconColor}"/>
<SolidColorBrush x:Key="BorderBrush" Color="{DynamicResource BorderColor}"/>
<SolidColorBrush x:Key="SecondaryBorderBrush" Color="{DynamicResource SecondaryBorderColor}"/>
<SolidColorBrush x:Key="BackgroundBrush" Color="{DynamicResource BackgroundColor}"/>
<SolidColorBrush x:Key="RegionBrush" Color="{DynamicResource RegionColor}"/>
<SolidColorBrush x:Key="SecondaryRegionBrush" Color="{DynamicResource SecondaryRegionColor}"/>
<SolidColorBrush x:Key="ThirdlyRegionBrush" Color="{DynamicResource ThirdlyRegionColor}"/>
<LinearGradientBrush x:Key="TitleBrush" EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="{DynamicResource TitleColor}" Offset="0"/>
<GradientStop Color="{DynamicResource SecondaryTitleColor}" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="DefaultBrush" Color="{DynamicResource DefaultColor}"/>
<SolidColorBrush x:Key="DarkDefaultBrush" Color="{DynamicResource DarkDefaultColor}"/>
@@ -19,11 +19,17 @@
<Color x:Key="PrimaryTextColor">#212121</Color>
<Color x:Key="SecondaryTextColor">#757575</Color>
<Color x:Key="ThirdlyTextColor">#bdbdbd</Color>
<Color x:Key="ReverseTextColor">#212121</Color>
<Color x:Key="TextIconColor">White</Color>
<Color x:Key="BorderColor">#e0e0e0</Color>
<Color x:Key="SecondaryBorderColor">#a0a0a0</Color>
<Color x:Key="BackgroundColor">#eeeeee</Color>
<Color x:Key="RegionColor">White</Color>
<Color x:Key="RegionColor">#ffffff</Color>
<Color x:Key="SecondaryRegionColor">#eeeeee</Color>
<Color x:Key="ThirdlyRegionColor">White</Color>
<Color x:Key="TitleColor">#73a5ff</Color>
<Color x:Key="SecondaryTitleColor">#5477f5</Color>
<Color x:Key="DefaultColor">White</Color>
<Color x:Key="DarkDefaultColor">#f4f4f4</Color>
@@ -33,4 +39,5 @@
<Color x:Key="DarkMaskColor">#20000000</Color>
<Color x:Key="DarkOpacityColor">#40000000</Color>
</ResourceDictionary>
@@ -0,0 +1,43 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Color x:Key="PrimaryColor">#73a5ff</Color>
<Color x:Key="DarkPrimaryColor">#5477f5</Color>
<Color x:Key="DangerColor">#ff8792</Color>
<Color x:Key="DarkDangerColor">#ff4c9f</Color>
<Color x:Key="WarningColor">#ffd07a</Color>
<Color x:Key="DarkWarningColor">#ff9133</Color>
<Color x:Key="InfoColor">#4dd0e1</Color>
<Color x:Key="DarkInfoColor">#00bcd4</Color>
<Color x:Key="SuccessColor">#A5D6A7</Color>
<Color x:Key="DarkSuccessColor">#4CAF50</Color>
<Color x:Key="PrimaryTextColor">White</Color>
<Color x:Key="SecondaryTextColor">#757575</Color>
<Color x:Key="ThirdlyTextColor">#3f3f46</Color>
<Color x:Key="ReverseTextColor">#212121</Color>
<Color x:Key="TextIconColor">White</Color>
<Color x:Key="BorderColor">#3f3f46</Color>
<Color x:Key="SecondaryBorderColor">#555555</Color>
<Color x:Key="BackgroundColor">#eeeeee</Color>
<Color x:Key="RegionColor">#1c1c1c</Color>
<Color x:Key="SecondaryRegionColor">#2d2d30</Color>
<Color x:Key="ThirdlyRegionColor">#2d2d30</Color>
<Color x:Key="TitleColor">#3f3f46</Color>
<Color x:Key="SecondaryTitleColor">#2d2d30</Color>
<Color x:Key="DefaultColor">#686868</Color>
<Color x:Key="DarkDefaultColor">#686868</Color>
<Color x:Key="AccentColor">#ff5722</Color>
<Color x:Key="DarkAccentColor">#d43f3a</Color>
<Color x:Key="DarkMaskColor">#40000000</Color>
<Color x:Key="DarkOpacityColor">#40000000</Color>
</ResourceDictionary>
+7
View File
@@ -0,0 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Basic/Colors/ColorsDark.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
+7
View File
@@ -0,0 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Basic/Colors/Colors.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
@@ -1,9 +1,13 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../Basic/Fonts.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="BaseStyle" TargetType="{x:Type Control}">
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="FontSize" Value="{DynamicResource TextFontSize}"/>
<Setter Property="FontSize" Value="{StaticResource TextFontSize}"/>
</Style>
</ResourceDictionary>
@@ -3,12 +3,13 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="BaseStyle.xaml"/>
<ResourceDictionary Source="../../Basic/Sizes.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="ButtonBaseBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="{x:Type ButtonBase}">
<Setter Property="Height" Value="{DynamicResource DefaultControlHeight}"/>
<Setter Property="Height" Value="{StaticResource DefaultControlHeight}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Padding" Value="{DynamicResource DefaultControlPadding}"/>
<Setter Property="Padding" Value="{StaticResource DefaultControlPadding}"/>
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
@@ -8,7 +8,6 @@
<Style x:Key="ButtonBaseStyle" BasedOn="{StaticResource ButtonBaseBaseStyle}" TargetType="{x:Type Button}">
<Setter Property="controls:BorderElement.CornerRadius" Value="4"/>
<Setter Property="BorderBrush" Value="{DynamicResource DarkMaskBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
@@ -43,7 +43,7 @@
<Setter Property="Visibility" TargetName="contentPresenter" Value="Visible"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@@ -18,7 +18,7 @@
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border x:Name="templateRoot" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
<Border Margin="0,0,6,0" x:Name="splitBorder" BorderBrush="Transparent" BorderThickness="1" HorizontalAlignment="Right" SnapsToDevicePixels="true" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
<Border Margin="0,0,6,0" x:Name="splitBorder" BorderBrush="Transparent" BorderThickness="1" HorizontalAlignment="Right" SnapsToDevicePixels="true" Width="{StaticResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
<Path x:Name="arrow" Data="{StaticResource DownGeometry}" Stretch="Uniform" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5"/>
</Border>
</Border>
@@ -42,7 +42,7 @@
<ControlTemplate TargetType="ToggleButton">
<Grid>
<Border x:Name="templateRoot" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
<Border Margin="0,0,6,0" x:Name="splitBorder" BorderBrush="Transparent" BorderThickness="1" HorizontalAlignment="Right" SnapsToDevicePixels="true" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
<Border Margin="0,0,6,0" x:Name="splitBorder" BorderBrush="Transparent" BorderThickness="1" HorizontalAlignment="Right" SnapsToDevicePixels="true" Width="{StaticResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
<Path x:Name="arrow" Data="{StaticResource DownGeometry}" Stretch="Uniform" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5"/>
</Border>
</Border>
@@ -64,8 +64,8 @@
<ColumnDefinition/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="White">
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
<ScrollViewer Margin="0,4" x:Name="DropDownScrollViewer">
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
<Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
@@ -76,7 +76,7 @@
</ScrollViewer>
</Border>
</Popup>
<ToggleButton Grid.Column="0" x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
<ToggleButton Grid.Column="0" x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{Binding Background,RelativeSource={RelativeSource TemplatedParent}}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
<ContentPresenter Margin="8,8,2,7" Grid.Column="0" x:Name="contentPresenter" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Content="{TemplateBinding SelectionBoxItem}" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
<ControlTemplate.Triggers>
@@ -99,7 +99,7 @@
<Condition Property="IsMouseOver" Value="true" SourceName="toggleButton"/>
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@@ -128,8 +128,8 @@
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
</StackPanel>
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="White">
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=toggleButton}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
<ScrollViewer Margin="0,4" x:Name="DropDownScrollViewer">
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
<Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
@@ -163,7 +163,7 @@
<Condition Property="IsMouseOver" Value="true" SourceName="toggleButton"/>
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@@ -189,8 +189,8 @@
<TextBlock Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
</StackPanel>
<Popup Grid.Column="1" x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="White">
<Popup Grid.Column="1" x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
<ScrollViewer Margin="0,4" x:Name="DropDownScrollViewer">
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
<Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
@@ -224,7 +224,7 @@
<Condition Property="IsMouseOver" Value="true" SourceName="toggleButton"/>
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@@ -263,8 +263,8 @@
<ColumnDefinition/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="White">
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
<ScrollViewer Margin="0,4" x:Name="DropDownScrollViewer">
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
<Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
@@ -277,7 +277,7 @@
</Popup>
<ToggleButton Grid.Column="0" x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
<Border Grid.Column="0" x:Name="border" Background="Transparent" Margin="3,1">
<TextBox x:Name="PART_EditableTextBox" Background="Transparent" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="3,0" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<TextBox x:Name="PART_EditableTextBox" Background="{TemplateBinding Background}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="3,0" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</Grid>
<ControlTemplate.Triggers>
@@ -300,14 +300,14 @@
<Condition Property="IsMouseOver" Value="true" SourceName="border"/>
<Condition Property="IsFocused" Value="false" SourceName="PART_EditableTextBox"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="true" SourceName="toggleButton"/>
<Condition Property="IsFocused" Value="false" SourceName="PART_EditableTextBox"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@@ -336,8 +336,8 @@
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
</StackPanel>
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="White">
<Popup Grid.Column="0" Grid.Row="1" x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
<ScrollViewer Margin="0,4" x:Name="DropDownScrollViewer">
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
<Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
@@ -351,7 +351,7 @@
<ToggleButton Grid.Row="1" Grid.Column="0" x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
<TextBlock Margin="8,7,8,8" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="0" Grid.Row="1" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
<Border Grid.Row="1" Grid.Column="0" x:Name="border" Background="Transparent" Margin="4,1">
<TextBox Padding="2,6,2,7" x:Name="PART_EditableTextBox" Background="Transparent" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<TextBox Padding="2,6,2,7" x:Name="PART_EditableTextBox" Background="{TemplateBinding Background}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</Grid>
<ControlTemplate.Triggers>
@@ -374,14 +374,14 @@
<Condition Property="IsMouseOver" Value="true" SourceName="border"/>
<Condition Property="IsFocused" Value="false" SourceName="PART_EditableTextBox"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="true" SourceName="toggleButton"/>
<Condition Property="IsFocused" Value="false" SourceName="PART_EditableTextBox"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@@ -407,8 +407,8 @@
<TextBlock Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
</StackPanel>
<Popup Grid.Column="1" x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="White">
<Popup Grid.Column="1" x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
<ScrollViewer Margin="0,4" x:Name="DropDownScrollViewer">
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
<Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
@@ -422,7 +422,7 @@
<ToggleButton Grid.Column="1" x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
<TextBlock Margin="8,7,8,8" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
<Border Grid.Column="1" x:Name="border" Background="Transparent" Margin="4,1">
<TextBox Padding="2,6,2,7" x:Name="PART_EditableTextBox" Background="Transparent" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<TextBox Padding="2,6,2,7" x:Name="PART_EditableTextBox" Background="{TemplateBinding Background}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</Grid>
<ControlTemplate.Triggers>
@@ -445,14 +445,14 @@
<Condition Property="IsMouseOver" Value="true" SourceName="border"/>
<Condition Property="IsFocused" Value="false" SourceName="PART_EditableTextBox"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="true" SourceName="toggleButton"/>
<Condition Property="IsFocused" Value="false" SourceName="PART_EditableTextBox"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@@ -487,7 +487,7 @@
<Condition Property="IsSelected" Value="False"/>
<Condition Property="IsMouseOver" Value="True"/>
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource BackgroundBrush}"/>
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@@ -504,7 +504,7 @@
<Style x:Key="ComboBoxBaseStyle" TargetType="{x:Type ComboBox}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="ItemContainerStyle" Value="{StaticResource ComboBoxItemBaseStyle}"/>
<Setter Property="controls:BorderElement.CornerRadius" Value="4"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
@@ -64,14 +64,14 @@
<Path x:Name="Glyph" Margin="2" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center" Data="F1 M 9.97498,1.22334L 4.6983,9.09834L 4.52164,9.09834L 0,5.19331L 1.27664,3.52165L 4.255,6.08833L 8.33331,1.52588e-005L 9.97498,1.22334 Z " Fill="White" FlowDirection="LeftToRight"/>
</Border>
<ContentPresenter x:Name="menuHeaderContainer" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Grid.Column="1" ContentStringFormat="{TemplateBinding HeaderStringFormat}" ContentSource="Header" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
<Popup Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=templateRoot}" AllowsTransparency="True" Focusable="False" IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" Placement="Bottom">
<Popup Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=templateRoot}" AllowsTransparency="True" Focusable="False" IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.MenuPopupAnimationKey}}" Placement="Bottom">
<Grid>
<Border CornerRadius="0,0,2,2" x:Name="SubMenuBorder" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="White">
<Border CornerRadius="0,0,2,2" x:Name="SubMenuBorder" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
<controls:ScrollViewer VerticalScrollBarVisibility="Auto" x:Name="SubMenuScrollViewer" Margin="0,6">
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Cycle" Grid.IsSharedSizeScope="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle"/>
</controls:ScrollViewer>
</Border>
<Border Height="1" Background="White" VerticalAlignment="Top" BorderThickness="1,0" BorderBrush="{DynamicResource BorderBrush}" HorizontalAlignment="Left" Width="{Binding ActualWidth,ElementName=templateRoot}"/>
<Border Height="1" Background="{DynamicResource RegionBrush}" VerticalAlignment="Top" BorderThickness="1,0" BorderBrush="{DynamicResource BorderBrush}" HorizontalAlignment="Left" Width="{Binding ActualWidth,ElementName=templateRoot}"/>
</Grid>
</Popup>
</Grid>
@@ -88,12 +88,12 @@
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
</Trigger>
<Trigger Property="IsHighlighted" Value="True">
<Setter Property="Background" TargetName="templateRoot" Value="WhiteSmoke"/>
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="TextElement.Foreground" TargetName="menuHeaderContainer" Value="{DynamicResource PrimaryTextBrush}"/>
</Trigger>
<Trigger Property="IsSubmenuOpen" Value="True">
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Background" TargetName="templateRoot" Value="White"/>
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource RegionBrush}"/>
<Setter Property="TextElement.Foreground" TargetName="menuHeaderContainer" Value="{DynamicResource PrimaryTextBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
@@ -180,8 +180,8 @@
</Border>
<ContentPresenter TextElement.Foreground="{TemplateBinding Foreground}" x:Name="ContentPresenter" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Grid.Column="1" ContentSource="Header" Margin="10" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Uid="ContentPresenter_39"/>
<Path x:Name="Path" Grid.Column="4" Width="10" Height="10" HorizontalAlignment="Left" Data="{StaticResource RightGeometry}" Stretch="Uniform" Fill="{TemplateBinding Foreground}" Uid="Path_16" VerticalAlignment="Center"/>
<Popup Grid.Column="1" x:Name="PART_Popup" AllowsTransparency="True" Focusable="False" IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" Placement="Right" VerticalOffset="-7">
<Border CornerRadius="2" x:Name="SubMenuBorder" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="White">
<Popup Grid.Column="1" x:Name="PART_Popup" AllowsTransparency="True" Focusable="False" IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{StaticResource {x:Static SystemParameters.MenuPopupAnimationKey}}" Placement="Right" VerticalOffset="-7">
<Border CornerRadius="2" x:Name="SubMenuBorder" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
<controls:ScrollViewer VerticalScrollBarVisibility="Auto" x:Name="SubMenuScrollViewer" Margin="0,6">
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Cycle" Grid.IsSharedSizeScope="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle"/>
</controls:ScrollViewer>
@@ -210,10 +210,11 @@
<!--普通菜单-->
<Style x:Key="ContextMenuBaseStyle" TargetType="{x:Type ContextMenu}">
<Setter Property="MaxHeight" Value="199"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContextMenu}">
<Border Background="White" CornerRadius="2" MaxHeight="{TemplateBinding MaxHeight}" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
<Border Background="{TemplateBinding Background}" CornerRadius="2" MaxHeight="{TemplateBinding MaxHeight}" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
<controls:ScrollViewer Margin="0,6" VerticalScrollBarVisibility="Auto">
<ItemsPresenter/>
</controls:ScrollViewer>
@@ -3,9 +3,7 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../Basic/Geometries.xaml"/>
<ResourceDictionary Source="../../Basic/Converters.xaml"/>
<ResourceDictionary Source="../Button.xaml"/>
<ResourceDictionary Source="../Calendar.xaml"/>
</ResourceDictionary.MergedDictionaries>
@@ -32,7 +30,7 @@
<Setter Property="controls:BorderElement.CornerRadius" Value="4"/>
<Setter Property="IsTodayHighlighted" Value="True"/>
<Setter Property="SelectedDateFormat" Value="Short"/>
<Setter Property="Background" Value="{DynamicResource DefaultBrush}"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Padding" Value="6"/>
@@ -48,7 +46,7 @@
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<Button Style="{StaticResource ButtonIcon}" Padding="7" controls:IconElement.Geometry="{StaticResource CalendarGeometry}" x:Name="PART_Button" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" Focusable="False" Grid.Row="0"/>
<DatePickerTextBox Padding="5,6" Margin="0,0,0,1" x:Name="PART_TextBox" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Style="{DynamicResource DatePickerTextBoxStyle}"/>
<DatePickerTextBox Foreground="{TemplateBinding Foreground}" Padding="5,6" Margin="0,0,0,1" x:Name="PART_TextBox" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Style="{StaticResource DatePickerTextBoxStyle}"/>
<Popup Grid.Column="0" VerticalOffset="1" x:Name="PART_Popup" PopupAnimation="Fade" AllowsTransparency="True" Placement="Bottom" PlacementTarget="{Binding ElementName=PART_TextBox}" StaysOpen="False"/>
</Grid>
</Border>
@@ -61,7 +59,7 @@
<Condition Property="IsMouseOver" Value="true"/>
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@@ -7,10 +7,11 @@
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Padding" Value="10,0"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="Height" Value="32"/>
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
@@ -35,8 +36,8 @@
<Condition Property="IsSelected" Value="true"/>
<Condition Property="Selector.IsSelectionActive" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}"/>
<Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
</MultiTrigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Opacity" Value=".4"/>
@@ -59,7 +60,7 @@
</Style>
<Style x:Key="ListBoxBaseStyle" TargetType="{x:Type ListBox}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
@@ -10,7 +10,7 @@
</ResourceDictionary.MergedDictionaries>
<Style x:Key="NumericUpDownBaseStyle" TargetType="controls:NumericUpDown">
<Setter Property="Background" Value="White"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
@@ -19,7 +19,7 @@
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="AllowDrop" Value="true"/>
<Setter Property="Padding" Value="5,6"/>
<Setter Property="Padding" Value="4,6,5,6"/>
<Setter Property="Height" Value="30"/>
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
@@ -33,7 +33,7 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" x:Name="border" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<TextBox Focusable="True" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Background="Transparent" x:Name="PART_TextBox" BorderThickness="0" Style="{x:Null}" Padding="{TemplateBinding Padding}" Margin="0,0,30,1" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<TextBox Focusable="True" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Background="{TemplateBinding Background}" x:Name="PART_TextBox" BorderThickness="0" Style="{x:Null}" Padding="{TemplateBinding Padding}" Margin="2,0,30,1" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<Button Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Prev" Padding="5,7,5,1" Margin="0,0,0,16" Focusable="False" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=border}" controls:IconElement.Geometry="{StaticResource UpGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
<Button Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Next" Padding="5,1,5,7" Margin="0,16,0,0" Focusable="False" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=border}" controls:IconElement.Geometry="{StaticResource DownGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
@@ -43,13 +43,13 @@
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</Trigger>
<Trigger Property="IsFocused" Value="true" SourceName="PART_TextBox">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
</Trigger>
<Trigger Property="ShowUpDownButton" Value="False">
<Setter Property="Margin" TargetName="PART_TextBox" Value="0,0,0,1"/>
<Setter Property="Margin" TargetName="PART_TextBox" Value="2,0,2,1"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -3,7 +3,7 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<Style x:Key="PasswordBoxBaseStyle" TargetType="{x:Type PasswordBox}">
<Setter Property="Background" Value="White"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
@@ -29,7 +29,7 @@
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource SecondaryBorderBrush}"/>
</Trigger>
<Trigger Property="IsFocused" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:HandyControl.Controls">
<LinearGradientBrush x:Key="ProgressBarIndicatorAnimatedFill" StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#00FFFFFF" Offset="0"/>
@@ -10,38 +11,57 @@
<Style x:Key="ProgressBarBaseStyle" TargetType="{x:Type ProgressBar}">
<Setter Property="Height" Value="20"/>
<Setter Property="Background" Value="#f5f5f5"/>
<Setter Property="BorderBrush" Value="#19000000"/>
<Setter Property="BorderThickness" Value="1,1,1,0"/>
<Setter Property="controls:BorderElement.CornerRadius" Value="4"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ProgressBar}">
<Grid>
<Border x:Name="TemplateRoot" CornerRadius="4" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
<Border.Effect>
<BlurEffect Radius="2"/>
</Border.Effect>
</Border>
<Border x:Name="TemplateRoot" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
<Grid Margin="{TemplateBinding BorderThickness}">
<Rectangle x:Name="PART_Track"/>
<Grid HorizontalAlignment="Left">
<Decorator x:Name="PART_Indicator" HorizontalAlignment="Left" Margin="0,-1,0,0">
<Border CornerRadius="4" x:Name="Animation" ClipToBounds="true" Background="{TemplateBinding Foreground}">
<Decorator x:Name="PART_Indicator" HorizontalAlignment="Left">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="Animation" ClipToBounds="true" Background="{TemplateBinding Foreground}">
<Rectangle x:Name="PART_GlowRect" Fill="{StaticResource ProgressBarIndicatorAnimatedFill}" HorizontalAlignment="Left" Margin="-100,0,0,0" Width="100"/>
</Border>
</Decorator>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TextIconBrush}" Text="{Binding Value,RelativeSource={RelativeSource FindAncestor,AncestorType=ProgressBar},StringFormat={}{0} %}"/>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TextIconBrush}" Text="{Binding Value,RelativeSource={RelativeSource TemplatedParent},StringFormat={}{0} %}"/>
</Grid>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ProgressBarStripeBaseStyle" BasedOn="{StaticResource ProgressBarBaseStyle}" TargetType="ProgressBar">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ProgressBar">
<ControlTemplate.Resources>
<Storyboard x:Key="OnLoaded">
<DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetProperty="(Border.Background).(Brush.Transform).(TransformGroup.Children)[1].(TranslateTransform.X)" Storyboard.TargetName="Indicator">
<LinearDoubleKeyFrame KeyTime="0" Value="0"/>
<LinearDoubleKeyFrame KeyTime="0:0:.25" Value="21"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<Grid x:Name="TemplateRoot" SnapsToDevicePixels="true">
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
<Rectangle x:Name="PART_Track" Margin="1"/>
<Decorator x:Name="PART_Indicator" HorizontalAlignment="Left" Margin="1">
<Grid x:Name="Foreground">
<Border x:Name="Indicator" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Foreground}"/>
</Grid>
</Decorator>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="Orientation" Value="Vertical">
<Setter Property="LayoutTransform" TargetName="TemplateRoot">
<Setter.Value>
<RotateTransform Angle="-90"/>
</Setter.Value>
</Setter>
</Trigger>
<EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="Indicator">
<BeginStoryboard Storyboard="{StaticResource OnLoaded}"/>
</EventTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
@@ -3,7 +3,7 @@
<Style x:Key="RadioButtonBaseStyle" TargetType="RadioButton">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Background" Value="{DynamicResource DefaultBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
@@ -53,7 +53,7 @@
<Setter Property="Visibility" TargetName="contentPresenter" Value="Visible"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@@ -4,7 +4,7 @@
<Style x:Key="TabItemStyle" TargetType="{x:Type TabItem}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="10,6"/>
@@ -42,6 +42,7 @@
</Style>
<Style x:Key="TabControlBaseStyle" TargetType="{x:Type TabControl}">
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="ItemContainerStyle" Value="{StaticResource TabItemStyle}"/>
@@ -49,7 +50,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
<Grid x:Name="templateRoot" Background="White" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid x:Name="templateRoot" Background="{DynamicResource RegionBrush}" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0"/>
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
@@ -1,11 +1,15 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../Basic/Fonts.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="TextBlockBaseStyle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="FontSize" Value="{DynamicResource TextFontSize}"/>
<Setter Property="FontSize" Value="{StaticResource TextFontSize}"/>
</Style>
<Style x:Key="TextBlockBoldBaseStyle" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
@@ -10,12 +10,12 @@
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="Padding" Value="6"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:WatermarkTextBox">
<Grid x:Name="WatermarkContent">
<Border x:Name="ContentElement"/>
<Border x:Name="watermark_decorator">
<ContentControl VerticalAlignment="{TemplateBinding VerticalContentAlignment}" TextElement.Foreground="{DynamicResource ThirdlyTextBrush}" Margin="7,6" x:Name="PART_Watermark" Focusable="False" IsHitTestVisible="False" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" Padding="0"/>
</Border>
@@ -27,10 +27,11 @@
</Style>
<Style x:Key="TextBoxBaseStyle" TargetType="TextBox">
<Setter Property="Background" Value="White"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CaretBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="controls:BorderElement.CornerRadius" Value="4"/>
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
@@ -52,7 +53,7 @@
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource SecondaryBorderBrush}"/>
</Trigger>
<Trigger Property="IsFocused" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
@@ -10,7 +10,7 @@
<Style x:Key="TimePickerBaseStyle" TargetType="controls:TimePicker">
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="controls:BorderElement.CornerRadius" Value="4"/>
<Setter Property="Background" Value="{DynamicResource DefaultBrush}"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Height" Value="30"/>
<Setter Property="BorderThickness" Value="1"/>
@@ -25,7 +25,7 @@
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<Button Style="{StaticResource ButtonIcon}" Padding="7" controls:IconElement.Geometry="{StaticResource ClockGeometry}" x:Name="PART_Button" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" Focusable="False" Grid.Row="0"/>
<controls:WatermarkTextBox Padding="5,6" Margin="0,0,0,1" x:Name="PART_TextBox" HorizontalAlignment="Stretch" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<controls:WatermarkTextBox CaretBrush="{TemplateBinding Foreground}" Padding="5,6" Margin="0,0,0,1" x:Name="PART_TextBox" HorizontalAlignment="Stretch" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Popup Grid.Column="0" VerticalOffset="1" x:Name="PART_Popup" PopupAnimation="Fade" Placement="Bottom" PlacementTarget="{Binding ElementName=PART_TextBox}" StaysOpen="False">
<controls:Clock x:Name="PART_Clock" ShowConfirmButton="True"/>
</Popup>
@@ -40,7 +40,7 @@
<Condition Property="IsMouseOver" Value="true"/>
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@@ -53,7 +53,7 @@
<Style x:Key="ToggleButtonSwitchBaseStyle" TargetType="ToggleButton">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Background" Value="{DynamicResource DefaultBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
@@ -123,7 +123,7 @@
</Grid.ColumnDefinitions>
<Border Height="22" Width="36" x:Name="backBorder" Background="{DynamicResource BorderBrush}" CornerRadius="11"/>
<Border Grid.Column="0" Height="22" Width="36" x:Name="lightBorder" Background="{DynamicResource PrimaryBrush}" CornerRadius="11" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
<Border Grid.Column="0" Margin="1" Background="White" CornerRadius="11" Name="innerBorder" RenderTransformOrigin=".8,0.5">
<Border Grid.Column="0" Margin="1" Background="{TemplateBinding Background}" CornerRadius="11" Name="innerBorder" RenderTransformOrigin=".8,0.5">
<Border.RenderTransform>
<TransformGroup>
<ScaleTransform/>
@@ -164,8 +164,8 @@
<Style x:Key="ToggleButtonIconBaseStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
<Setter Property="Width" Value="{DynamicResource DefaultControlHeight}"/>
<Setter Property="Height" Value="{DynamicResource DefaultControlHeight}"/>
<Setter Property="Width" Value="{StaticResource DefaultControlHeight}"/>
<Setter Property="Height" Value="{StaticResource DefaultControlHeight}"/>
<Setter Property="Padding" Value="8"/>
<Setter Property="controls:IconSwitchElement.Geometry" Value="{x:Null}"/>
<Setter Property="controls:IconSwitchElement.GeometrySelected" Value="{x:Null}"/>
+1 -1
View File
@@ -7,7 +7,7 @@
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource ButtonBaseStyle}" TargetType="{x:Type Button}">
<Setter Property="Background" Value="{DynamicResource DefaultBrush}"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Style.Triggers>
+16 -8
View File
@@ -29,7 +29,7 @@
<VisualState x:Name="Selected">
<Storyboard>
<DoubleAnimation Duration="0:0:.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedBackground"/>
<ColorAnimation Duration="0" To="#FFFFFFFF" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="NormalText"/>
<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="NormalText"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
@@ -47,7 +47,11 @@
</VisualStateManager.VisualStateGroups>
<Rectangle x:Name="SelectedBackground" Fill="{DynamicResource DangerBrush}" Opacity="0" RadiusY="16" RadiusX="16"/>
<Rectangle x:Name="Background" Fill="{TemplateBinding Background}" Opacity="0" RadiusY="16" RadiusX="16"/>
<ContentPresenter x:Name="NormalText" TextElement.Foreground="#212121" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
<ContentPresenter x:Name="NormalText" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<TextElement.Foreground>
<SolidColorBrush Color="{DynamicResource PrimaryTextColor}"/>
</TextElement.Foreground>
</ContentPresenter>
<Rectangle x:Name="CalendarButtonFocusVisual" IsHitTestVisible="false" RadiusY="16" RadiusX="16" Stroke="{DynamicResource PrimaryBrush}" Visibility="Collapsed"/>
</Grid>
<ControlTemplate.Triggers>
@@ -92,7 +96,7 @@
<VisualState x:Name="Selected">
<Storyboard>
<DoubleAnimation Duration="0:0:.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedBackground"/>
<ColorAnimation Duration="0" To="#FFFFFFFF" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="NormalText"/>
<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="NormalText"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
@@ -115,14 +119,18 @@
<VisualState x:Name="Today">
<Storyboard>
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="TodayBackground"/>
<ColorAnimation Duration="0" To="#FFFFFFFF" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="NormalText"/>
<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="NormalText"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Rectangle RadiusX="16" RadiusY="16" x:Name="TodayBackground" Fill="{DynamicResource DangerBrush}" Opacity="0"/>
<Rectangle x:Name="SelectedBackground" Fill="{DynamicResource PrimaryBrush}" Opacity="0" RadiusY="16" RadiusX="16"/>
<ContentPresenter x:Name="NormalText" TextElement.Foreground="#212121" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
<ContentPresenter x:Name="NormalText" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<TextElement.Foreground>
<SolidColorBrush Color="{DynamicResource PrimaryTextColor}"/>
</TextElement.Foreground>
</ContentPresenter>
</Grid>
</ControlTemplate>
</Setter.Value>
@@ -162,7 +170,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Background="{DynamicResource PrimaryBrush}" Grid.ColumnSpan="3"/>
<Border Background="{DynamicResource TitleBrush}" Grid.ColumnSpan="3"/>
<Button x:Name="PART_PreviousButton" Width="50" HorizontalAlignment="Left" Grid.Column="0" Height="50" Padding="16" Focusable="False" Grid.Row="0" Style="{StaticResource ButtonIcon}" controls:IconElement.Geometry="{StaticResource LeftGeometry}"/>
<Button x:Name="PART_HeaderButton" Foreground="White" Grid.Column="1" FontWeight="Bold" FontSize="16" HorizontalAlignment="Center" Grid.Row="0" Style="{StaticResource ButtonCustom}"/>
<Button x:Name="PART_NextButton" Width="50" HorizontalAlignment="Right" Height="50" Padding="16" Grid.Column="2" Focusable="False" Grid.Row="0" Style="{StaticResource ButtonIcon}" controls:IconElement.Geometry="{StaticResource RightGeometry}"/>
@@ -219,8 +227,8 @@
</Style>
<Style x:Key="CalendarBaseStyle" TargetType="{x:Type Calendar}">
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CalendarDayButtonStyle" Value="{StaticResource CalendarDayButtonStyle}"/>
+5 -5
View File
@@ -4,7 +4,6 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Effects.xaml"/>
<ResourceDictionary Source="../Basic/Converters.xaml"/>
<ResourceDictionary Source="Button.xaml"/>
</ResourceDictionary.MergedDictionaries>
@@ -65,6 +64,7 @@
<Setter Property="Height" Value="290"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="ClockRadioButtonStyle" Value="{StaticResource ClockRadioButtonStyle}"/>
<Setter Property="Template">
<Setter.Value>
@@ -75,10 +75,10 @@
<RowDefinition Height="40"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Background="{DynamicResource PrimaryBrush}" Name="PART_BorderTitle">
<Border Background="{DynamicResource TitleBrush}" Name="PART_BorderTitle">
<TextBlock x:Name="PART_TimeStr" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="30" Foreground="White"/>
</Border>
<Border Grid.Row="1" Background="White">
<Border Grid.Row="1" Background="{TemplateBinding Background}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
@@ -86,13 +86,13 @@
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Canvas Grid.ColumnSpan="3" Margin="0,16,0,0" VerticalAlignment="Top" Name="PART_Canvas" Width="178" Height="178">
<Border Background="{DynamicResource DarkDefaultBrush}" Width="178" Height="178" CornerRadius="89"/>
<Border Background="{DynamicResource SecondaryRegionBrush}" Width="178" Height="178" CornerRadius="89"/>
<controls:CirclePanel Diameter="130" x:Name="PART_PanelNum" KeepVertical="True" Margin="24,24,0,0" OffsetAngle="-60"/>
<Border Focusable="False" Name="PART_BorderClock" Background="{DynamicResource PrimaryBrush}" RenderTransformOrigin="0.5,1" Height="63" Width="2" Canvas.Left="88" Canvas.Top="26"/>
<Ellipse Fill="White" Width="8" Height="8" StrokeThickness="2" Stroke="{DynamicResource PrimaryBrush}" Canvas.Top="85" Canvas.Left="85"/>
</Canvas>
<controls:ClockRadioButton Background="{DynamicResource PrimaryBrush}" Grid.Column="0" x:Name="PART_ButtonAm" IsChecked="True" Height="30" Width="30" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="16,0,0,16" Content="{x:Static langs:Lang.Am}" Style="{StaticResource ClockRadioButtonStyle}"/>
<controls:ClockRadioButton Background="{DynamicResource PrimaryBrush}" Grid.Column="2" x:Name="PART_ButtonPm" Height="30" Width="30" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,16" Content="{x:Static langs:Lang.Pm}" Style="{DynamicResource ClockRadioButtonStyle}"/>
<controls:ClockRadioButton Background="{DynamicResource PrimaryBrush}" Grid.Column="2" x:Name="PART_ButtonPm" Height="30" Width="30" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,16" Content="{x:Static langs:Lang.Pm}" Style="{StaticResource ClockRadioButtonStyle}"/>
<Button Grid.Column="1" Visibility="{TemplateBinding ShowConfirmButton,Converter={StaticResource Boolean2VisibilityConverter}}" Name="PART_ButtonConfirm" Content="{x:Static langs:Lang.Confirm}" Foreground="{DynamicResource PrimaryBrush}" HorizontalAlignment="Center" Margin="0,0,0,19" Height="24" Width="60" VerticalAlignment="Bottom" Background="Transparent" Style="{StaticResource ButtonCustom}"/>
</Grid>
</Border>
+6 -5
View File
@@ -13,6 +13,7 @@
<Style TargetType="controls:ColorPicker">
<Setter Property="Width" Value="230"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="Template">
<Setter.Value>
@@ -24,7 +25,7 @@
<RowDefinition Height="62"/>
<RowDefinition Height="62"/>
</Grid.RowDefinitions>
<Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Grid.RowSpan="4" Background="White"/>
<Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Grid.RowSpan="4" Background="{TemplateBinding Background}"/>
<Grid Margin="1" Grid.Row="0">
<Border Background="{TemplateBinding BackColor}"/>
<Border>
@@ -76,7 +77,7 @@
</StackPanel>
<UniformGrid Name="PART_PanelRgb" Visibility="{Binding ShowList[1],RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" Rows="1" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="-2,14,-2,0" VerticalAlignment="Top">
<StackPanel Margin="2,0">
<controls:NumericUpDown HorizontalContentAlignment="Center" Padding="0" Tag="R" Value="{Binding ChannelR,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" ShowUpDownButton="False" Maximum="255" Minimum="0" FontSize="10" Height="24" />
<controls:NumericUpDown HorizontalContentAlignment="Center" Padding="2,0" Tag="R" Value="{Binding ChannelR,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" ShowUpDownButton="False" Maximum="255" Minimum="0" FontSize="10" Height="24" />
<TextBlock Foreground="{DynamicResource ThirdlyTextBrush}" Margin="0,6,0,0" FontSize="10" Text="R" HorizontalAlignment="Center"/>
</StackPanel>
<StackPanel Margin="2,0">
@@ -92,16 +93,16 @@
<TextBlock Foreground="{DynamicResource ThirdlyTextBrush}" Margin="0,6,0,0" FontSize="10" Text="A" HorizontalAlignment="Center"/>
</StackPanel>
</UniformGrid>
<Button Command="interactivity:ControlCommands.Switch" Padding="6" FontSize="8" BorderThickness="0" Foreground="#323534" HorizontalAlignment="Right" Height="24" Width="20" Grid.Column="2" Grid.Row="1">
<Button Command="interactivity:ControlCommands.Switch" Padding="6" FontSize="8" BorderThickness="0" HorizontalAlignment="Right" Height="24" Width="20" Grid.Column="2" Grid.Row="1">
<Button.Content>
<Path Fill="#323534" Style="{StaticResource UpDownPathStyle}"/>
</Button.Content>
</Button>
</Grid>
<Border Grid.Row="2" BorderThickness="0,1,0,0" BorderBrush="{StaticResource BorderBrush}">
<Border Grid.Row="2" BorderThickness="0,1,0,0" BorderBrush="{DynamicResource BorderBrush}">
<WrapPanel Name="PART_PanelColor" Margin="12,12,0,12" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="{StaticResource BorderBrush}">
<Border Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="{DynamicResource BorderBrush}">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Command="interactivity:ControlCommands.Cancel" Content="{x:Static langs:Lang.Cancel}" Width="80" Margin="0,0,16,0"/>
<Button Command="interactivity:ControlCommands.Confirm" Content="{x:Static langs:Lang.Confirm}" Width="80" Style="{StaticResource ButtonPrimary}"/>
-2
View File
@@ -2,9 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Converters.xaml"/>
<ResourceDictionary Source="Base/ComboBoxBaseStyle.xaml"/>
<ResourceDictionary Source="TextBlock.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource ComboBoxBaseStyle}" TargetType="ComboBox"/>
+4 -4
View File
@@ -3,8 +3,6 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Converters.xaml"/>
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
<ResourceDictionary Source="Base/ScrollViewerBaseStyle.xaml"/>
<ResourceDictionary Source="Button.xaml"/>
<ResourceDictionary Source="ToggleButton.xaml"/>
@@ -53,7 +51,8 @@
</Style.Triggers>
</Style>
<Style x:Key="DataGridRowStyle" TargetType="{x:Type DataGridRow}">
<Setter Property="Background" Value="White"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="SnapsToDevicePixels" Value="true"/>
<Setter Property="Margin" Value="0,0,0,4"/>
<Setter Property="Padding" Value="0,6"/>
@@ -106,6 +105,7 @@
</Style>
<Style x:Key="DataGridColumnHeaderStyle" TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="Padding" Value="12,6,12,12"/>
<Setter Property="MinHeight" Value="44"/>
<Setter Property="Template">
@@ -176,7 +176,7 @@
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
</Style>
<Style TargetType="{x:Type DataGrid}">
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="GridLinesVisibility" Value="None"/>
+4 -4
View File
@@ -27,7 +27,7 @@
</Grid.ColumnDefinitions>
<Button Style="{StaticResource ButtonIcon}" Padding="7" controls:IconElement.Geometry="{StaticResource CalendarGeometry}" x:Name="PART_Button" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" Focusable="False" Grid.Row="0"/>
<DatePickerTextBox x:Name="PART_TextBox" Grid.Column="0" Padding="5,6" Margin="0,0,0,1" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Style="{DynamicResource DatePickerTextBoxStyle}"/>
<DatePickerTextBox x:Name="PART_TextBox" Foreground="{TemplateBinding Foreground}" Grid.Column="0" Padding="5,6" Margin="0,0,0,1" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Style="{StaticResource DatePickerTextBoxStyle}"/>
<Popup Grid.Column="0" VerticalOffset="1" x:Name="PART_Popup" PopupAnimation="Fade" AllowsTransparency="True" Placement="Bottom" PlacementTarget="{Binding ElementName=PART_TextBox}" StaysOpen="False"/>
</Grid>
</Border>
@@ -41,7 +41,7 @@
<Condition Property="IsMouseOver" Value="true" SourceName="templateRoot"/>
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@@ -77,7 +77,7 @@
</Grid.ColumnDefinitions>
<Button Style="{StaticResource ButtonIcon}" Padding="7" controls:IconElement.Geometry="{StaticResource CalendarGeometry}" x:Name="PART_Button" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" Focusable="False" Grid.Row="0"/>
<DatePickerTextBox x:Name="PART_TextBox" Padding="5,6" Margin="0,0,0,1" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Style="{DynamicResource DatePickerTextBoxStyle}"/>
<DatePickerTextBox x:Name="PART_TextBox" Foreground="{TemplateBinding Foreground}" Padding="5,6" Margin="0,0,0,1" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Style="{StaticResource DatePickerTextBoxStyle}"/>
<Popup Grid.Column="0" VerticalOffset="1" x:Name="PART_Popup" PopupAnimation="Fade" AllowsTransparency="True" Placement="Bottom" PlacementTarget="{Binding ElementName=PART_TextBox}" StaysOpen="False"/>
</Grid>
</Border>
@@ -91,7 +91,7 @@
<Condition Property="IsMouseOver" Value="true" SourceName="templateRoot"/>
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
+2 -3
View File
@@ -5,17 +5,16 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
<ResourceDictionary Source="ToggleButton.xaml"/>
<ResourceDictionary Source="TextBlock.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type Expander}">
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="Background" Value="{DynamicResource TitleBrush}"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="MinHeight" Value="40"/>
<Setter Property="MinHeight" Value="32"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Expander}">
+2 -3
View File
@@ -1,7 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:HandyControl.Controls"
xmlns:langs="clr-namespace:HandyControl.Properties.Langs"
xmlns:interactivity="clr-namespace:HandyControl.Interactivity">
<ResourceDictionary.MergedDictionaries>
@@ -17,6 +15,7 @@
<Setter Property="Width" Value="320"/>
<Setter Property="Margin" Value="10,0,0,10"/>
<Setter Property="MaxWidth" Value="320"/>
<Setter Property="Background" Value="{DynamicResource ThirdlyRegionBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:Growl">
@@ -35,7 +34,7 @@
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Grid.ColumnSpan="3" Grid.RowSpan="2" Effect="{StaticResource EffectShadow2}" Background="White" CornerRadius="8" Width="320"/>
<Border Grid.ColumnSpan="3" Grid.RowSpan="2" Effect="{StaticResource EffectShadow2}" Background="{TemplateBinding Background}" CornerRadius="8" Width="320"/>
<Path Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" Margin="0,15,0,0" Width="30" Height="30" Data="{TemplateBinding Icon}" Stretch="Uniform" Fill="{TemplateBinding IconBrush}"/>
<StackPanel VerticalAlignment="Center" Grid.Row="0" Grid.Column="1" Margin="0,10,10,10">
<TextBlock Text="{TemplateBinding Message}" Style="{StaticResource TextBlockDefault}" HorizontalAlignment="Left" TextWrapping="Wrap"/>
+8
View File
@@ -0,0 +1,8 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Style TargetType="Image">
<Setter Property="Stretch" Value="Uniform" />
<Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality" />
</Style>
</ResourceDictionary>
@@ -5,9 +5,7 @@
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Converters.xaml"/>
<ResourceDictionary Source="Base/NumericUpDownBaseStyle.xaml"/>
<ResourceDictionary Source="TextBlock.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource NumericUpDownBaseStyle}" TargetType="controls:NumericUpDown"/>
@@ -19,7 +17,7 @@
<RowDefinition Height="{Binding Path=(controls:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}"/>
</Grid.RowDefinitions>
<StackPanel Visibility="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="7,4">
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
<TextBlock Foreground="{TemplateBinding Foreground}" Margin="1,0,0,0" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
</StackPanel>
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
@@ -28,7 +26,7 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<controls:WatermarkTextBox x:Name="PART_TextBox" Padding="5,6" Margin="0,0,0,1" Watermark="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<controls:WatermarkTextBox CaretBrush="{TemplateBinding Foreground}" x:Name="PART_TextBox" Padding="5,6" Margin="0,0,0,1" Watermark="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Button Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Prev" Padding="5,7,5,1" Margin="0,0,0,16" Focusable="False" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" controls:IconElement.Geometry="{StaticResource UpGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
<Button Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Next" Padding="5,1,5,7" Margin="0,16,0,0" Focusable="False" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" controls:IconElement.Geometry="{StaticResource DownGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
</Grid>
@@ -39,7 +37,7 @@
<Setter Property="Opacity" TargetName="templateRoot" Value="0.4"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true" SourceName="templateRoot">
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</Trigger>
<Trigger Property="IsFocused" Value="true" SourceName="PART_TextBox">
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryBrush}"/>
@@ -54,7 +52,7 @@
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel Visibility="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,8">
<TextBlock Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
<TextBlock Foreground="{TemplateBinding Foreground}" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
</StackPanel>
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
@@ -63,7 +61,7 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<controls:WatermarkTextBox x:Name="PART_TextBox" Padding="5,6" Margin="0,0,0,1" Watermark="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<controls:WatermarkTextBox CaretBrush="{TemplateBinding Foreground}" x:Name="PART_TextBox" Padding="5,6" Margin="0,0,0,1" Watermark="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Button Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Prev" Padding="5,7,5,1" Margin="0,0,0,16" Focusable="False" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" controls:IconElement.Geometry="{StaticResource UpGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
<Button Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Next" Padding="5,1,5,7" Margin="0,16,0,0" Focusable="False" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" controls:IconElement.Geometry="{StaticResource DownGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
</Grid>
@@ -74,7 +72,7 @@
<Setter Property="Opacity" TargetName="templateRoot" Value="0.4"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true" SourceName="templateRoot">
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</Trigger>
<Trigger Property="IsFocused" Value="true" SourceName="PART_TextBox">
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryBrush}"/>
+3 -3
View File
@@ -20,7 +20,7 @@
<Setter Property="Margin" Value="5,0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="RenderTransformOrigin" Value=".5,.5"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="Tag" Value="0"/>
<Setter Property="Template">
<Setter.Value>
@@ -70,7 +70,7 @@
</Grid.ColumnDefinitions>
<!--向左切换-->
<Button x:Name="PART_ButtonLeft" Command="interactivity:ControlCommands.Prev" Margin="5,0" VerticalAlignment="Center" Style="{StaticResource ButtonCustom}">
<Border CornerRadius="2" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Width="30" Height="30" Background="White">
<Border CornerRadius="2" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Width="30" Height="30" Background="{DynamicResource RegionBrush}">
<Path Margin="10" Fill="{DynamicResource PrimaryTextBrush}" Style="{StaticResource LeftPathStyle}"/>
</Border>
</Button>
@@ -90,7 +90,7 @@
</StackPanel>
<!--向右切换-->
<Button x:Name="PART_ButtonRight" Grid.Column="2" Command="interactivity:ControlCommands.Next" Margin="5,0" VerticalAlignment="Center" Style="{StaticResource ButtonCustom}">
<Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" CornerRadius="2" Width="30" Height="30" Background="White">
<Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" CornerRadius="2" Width="30" Height="30" Background="{DynamicResource RegionBrush}">
<Path Margin="10" Fill="{DynamicResource PrimaryTextBrush}" Style="{StaticResource RightPathStyle}" RenderTransformOrigin="0.5,0.5"/>
</Border>
</Button>
+2 -2
View File
@@ -33,7 +33,7 @@
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true" SourceName="PART_ContentHost">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource SecondaryBorderBrush}"/>
</Trigger>
<Trigger Property="IsFocused" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
@@ -63,7 +63,7 @@
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true" SourceName="PART_ContentHost">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource SecondaryBorderBrush}"/>
</Trigger>
<Trigger Property="IsFocused" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
+6 -38
View File
@@ -25,7 +25,7 @@
<Setter Property="Foreground" Value="{DynamicResource DangerBrush}"/>
</Style>
<Style x:Key="ProgressBarPrimaryStripe" BasedOn="{StaticResource ProgressBarBaseStyle}" TargetType="{x:Type ProgressBar}">
<Style x:Key="ProgressBarPrimaryStripe" BasedOn="{StaticResource ProgressBarStripeBaseStyle}" TargetType="{x:Type ProgressBar}">
<Setter Property="Foreground">
<Setter.Value>
<DrawingBrush Viewport="0,0,20,32" TileMode="Tile" ViewportUnits="Absolute" Stretch="None">
@@ -53,41 +53,9 @@
</DrawingBrush>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ProgressBar}">
<ControlTemplate.Resources>
<Storyboard x:Key="OnLoaded">
<DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetProperty="(Border.Background).(Brush.Transform).(TransformGroup.Children)[1].(TranslateTransform.X)" Storyboard.TargetName="Indicator">
<LinearDoubleKeyFrame KeyTime="0" Value="0"/>
<LinearDoubleKeyFrame KeyTime="0:0:.25" Value="21"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<Grid x:Name="TemplateRoot" SnapsToDevicePixels="true">
<Border CornerRadius="4" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
<Border.Effect>
<BlurEffect Radius="2"/>
</Border.Effect>
</Border>
<Rectangle x:Name="PART_Track" Margin="1"/>
<Decorator x:Name="PART_Indicator" HorizontalAlignment="Left" Margin="1">
<Grid x:Name="Foreground">
<Border x:Name="Indicator" CornerRadius="4" Background="{TemplateBinding Foreground}"/>
</Grid>
</Decorator>
</Grid>
<ControlTemplate.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="Indicator">
<BeginStoryboard Storyboard="{StaticResource OnLoaded}"/>
</EventTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ProgressBarSuccessStripe" BasedOn="{StaticResource ProgressBarPrimaryStripe}" TargetType="{x:Type ProgressBar}">
<Style x:Key="ProgressBarSuccessStripe" BasedOn="{StaticResource ProgressBarStripeBaseStyle}" TargetType="{x:Type ProgressBar}">
<Setter Property="Foreground">
<Setter.Value>
<DrawingBrush Viewport="0,0,20,32" TileMode="Tile" ViewportUnits="Absolute" Stretch="None">
@@ -117,7 +85,7 @@
</Setter>
</Style>
<Style x:Key="ProgressBarInfoStripe" BasedOn="{StaticResource ProgressBarPrimaryStripe}" TargetType="{x:Type ProgressBar}">
<Style x:Key="ProgressBarInfoStripe" BasedOn="{StaticResource ProgressBarStripeBaseStyle}" TargetType="{x:Type ProgressBar}">
<Setter Property="Foreground">
<Setter.Value>
<DrawingBrush Viewport="0,0,20,32" TileMode="Tile" ViewportUnits="Absolute" Stretch="None">
@@ -147,7 +115,7 @@
</Setter>
</Style>
<Style x:Key="ProgressBarWarningStripe" BasedOn="{StaticResource ProgressBarPrimaryStripe}" TargetType="{x:Type ProgressBar}">
<Style x:Key="ProgressBarWarningStripe" BasedOn="{StaticResource ProgressBarStripeBaseStyle}" TargetType="{x:Type ProgressBar}">
<Setter Property="Foreground">
<Setter.Value>
<DrawingBrush Viewport="0,0,20,32" TileMode="Tile" ViewportUnits="Absolute" Stretch="None">
@@ -177,7 +145,7 @@
</Setter>
</Style>
<Style x:Key="ProgressBarDangerStripe" BasedOn="{StaticResource ProgressBarPrimaryStripe}" TargetType="{x:Type ProgressBar}">
<Style x:Key="ProgressBarDangerStripe" BasedOn="{StaticResource ProgressBarStripeBaseStyle}" TargetType="{x:Type ProgressBar}">
<Setter Property="Foreground">
<Setter.Value>
<DrawingBrush Viewport="0,0,20,32" TileMode="Tile" ViewportUnits="Absolute" Stretch="None">
@@ -209,7 +177,7 @@
<Style x:Key="ProgressBarFlat" TargetType="{x:Type ProgressBar}">
<Setter Property="Height" Value="4"/>
<Setter Property="Background" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="Template">
<Setter.Value>
+12 -13
View File
@@ -4,7 +4,6 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
<ResourceDictionary Source="../Basic/Brushes.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="ColorPickerRepeatButton" TargetType="{x:Type RepeatButton}">
@@ -166,7 +165,7 @@
<DrawingBrush RenderOptions.CachingHint="Cache" Viewport="0,0,1,8" ViewportUnits="Absolute" Stretch="None" TileMode="Tile">
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="{StaticResource BorderBrush}">
<GeometryDrawing Brush="{DynamicResource BorderBrush}">
<GeometryDrawing.Geometry>
<GeometryGroup>
<RectangleGeometry Rect="0,0,1,4" />
@@ -178,16 +177,16 @@
</DrawingBrush>
</Border.Background>
</Border>
<Border x:Name="grip" Width="30" Height="30" CornerRadius="15" BorderThickness="1" BorderBrush="{StaticResource BorderBrush}" Background="White">
<Border x:Name="grip" Width="30" Height="30" CornerRadius="15" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="White">
<Grid Width="30" Height="30" Margin="-1,-1,0,0">
<Path x:Name="PathLeft" Data="{StaticResource LeftGeometry}" StrokeThickness="1" Stroke="{StaticResource PrimaryBrush}" Margin="6,8" HorizontalAlignment="Left" Stretch="Uniform" Width="12" Height="12" RenderTransformOrigin="0.5,0.5">
<Path x:Name="PathLeft" Data="{StaticResource LeftGeometry}" StrokeThickness="1" Stroke="{DynamicResource PrimaryBrush}" Margin="6,8" HorizontalAlignment="Left" Stretch="Uniform" Width="12" Height="12" RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<TransformGroup>
<TranslateTransform/>
</TransformGroup>
</Path.RenderTransform>
</Path>
<Path x:Name="PathRight" Data="{StaticResource RightGeometry}" StrokeThickness="1" Stroke="{StaticResource PrimaryBrush}" Margin="6,8" HorizontalAlignment="Right" Stretch="Uniform" Width="12" Height="12" RenderTransformOrigin="0.5,0.5">
<Path x:Name="PathRight" Data="{StaticResource RightGeometry}" StrokeThickness="1" Stroke="{DynamicResource PrimaryBrush}" Margin="6,8" HorizontalAlignment="Right" Stretch="Uniform" Width="12" Height="12" RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<TransformGroup>
<TranslateTransform/>
@@ -199,7 +198,7 @@
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="grip" Value="{StaticResource PrimaryBrush}"/>
<Setter Property="Background" TargetName="grip" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="Stroke" TargetName="PathLeft" Value="White"/>
<Setter Property="Stroke" TargetName="PathRight" Value="White"/>
</Trigger>
@@ -267,7 +266,7 @@
<DrawingBrush RenderOptions.CachingHint="Cache" Viewport="0,0,8,1" ViewportUnits="Absolute" Stretch="None" TileMode="Tile">
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="{StaticResource BorderBrush}">
<GeometryDrawing Brush="{DynamicResource BorderBrush}">
<GeometryDrawing.Geometry>
<GeometryGroup>
<RectangleGeometry Rect="0,0,4,1" />
@@ -279,16 +278,16 @@
</DrawingBrush>
</Border.Background>
</Border>
<Border x:Name="grip" Width="30" Height="30" CornerRadius="15" BorderThickness="1" BorderBrush="{StaticResource BorderBrush}" Background="White">
<Border x:Name="grip" Width="30" Height="30" CornerRadius="15" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="White">
<Grid Width="30" Height="30" Margin="-1,-1,0,0">
<Path x:Name="PathUp" Data="{StaticResource UpGeometry}" StrokeThickness="1" Stroke="{StaticResource PrimaryBrush}" Margin="9,6" VerticalAlignment="Top" Stretch="Uniform" Width="12" Height="12" RenderTransformOrigin="0.5,0.5">
<Path x:Name="PathUp" Data="{StaticResource UpGeometry}" StrokeThickness="1" Stroke="{DynamicResource PrimaryBrush}" Margin="9,6" VerticalAlignment="Top" Stretch="Uniform" Width="12" Height="12" RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<TransformGroup>
<TranslateTransform/>
</TransformGroup>
</Path.RenderTransform>
</Path>
<Path x:Name="PathDown" Data="{StaticResource DownGeometry}" StrokeThickness="1" Stroke="{StaticResource PrimaryBrush}" Margin="9,6" VerticalAlignment="Bottom" Stretch="Uniform" Width="12" Height="12" RenderTransformOrigin="0.5,0.5">
<Path x:Name="PathDown" Data="{StaticResource DownGeometry}" StrokeThickness="1" Stroke="{DynamicResource PrimaryBrush}" Margin="9,6" VerticalAlignment="Bottom" Stretch="Uniform" Width="12" Height="12" RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<TransformGroup>
<TranslateTransform/>
@@ -300,12 +299,12 @@
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true" SourceName="grip">
<Setter Property="Background" TargetName="grip" Value="{StaticResource PrimaryBrush}"/>
<Setter Property="Background" TargetName="grip" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="Stroke" TargetName="PathUp" Value="White"/>
<Setter Property="Stroke" TargetName="PathDown" Value="White"/>
</Trigger>
<Trigger Property="IsDragging" Value="true">
<Setter Property="Background" TargetName="grip" Value="{StaticResource PrimaryBrush}"/>
<Setter Property="Background" TargetName="grip" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="Stroke" TargetName="PathUp" Value="White"/>
<Setter Property="Stroke" TargetName="PathDown" Value="White"/>
<Trigger.EnterActions>
@@ -350,7 +349,7 @@
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="MinWidth" Value="30"/>
<Setter Property="MinHeight" Value="30"/>
<Setter Property="Template" Value="{StaticResource CompareSliderHorizontal}"/>
@@ -13,7 +13,7 @@
<Setter.Value>
<ControlTemplate TargetType="controls:StepItem">
<StackPanel>
<Border Background="White" HorizontalAlignment="Center" CornerRadius="12" BorderThickness="2" BorderBrush="{TemplateBinding Foreground}" Height="24" MinWidth="24">
<Border Background="{DynamicResource RegionBrush}" HorizontalAlignment="Center" CornerRadius="12" BorderThickness="2" BorderBrush="{TemplateBinding Foreground}" Height="24" MinWidth="24">
<TextBlock Foreground="{TemplateBinding Foreground}" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Index,RelativeSource={RelativeSource FindAncestor,AncestorType=controls:StepItem}}"/>
</Border>
<TextBlock Margin="0,10,0,0" Foreground="{TemplateBinding Foreground}" Style="{StaticResource TextBlockSubTitleBold}" Text="{TemplateBinding IndexStr}"/>
+2 -1
View File
@@ -29,12 +29,13 @@
<ResourceDictionary Source="TimePicker.xaml"/>
<ResourceDictionary Source="ContentControl.xaml"/>
<ResourceDictionary Source="Growl.xaml"/>
<ResourceDictionary Source="Steps.xaml"/>
<ResourceDictionary Source="StepBar.xaml"/>
<ResourceDictionary Source="Carousel.xaml"/>
<ResourceDictionary Source="TimeBar.xaml"/>
<ResourceDictionary Source="ColorPicker.xaml"/>
<ResourceDictionary Source="DataGrid.xaml"/>
<ResourceDictionary Source="TransitioningContentControl.xaml"/>
<ResourceDictionary Source="Image.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
+6 -6
View File
@@ -15,7 +15,7 @@
<Style TargetType="{x:Type controls:TabItem}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="BorderThickness" Value="1,0,1,1"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Margin" Value="0"/>
@@ -45,7 +45,7 @@
</ContextMenu>
</Grid.ContextMenu>
<Border Grid.ColumnSpan="2" BorderThickness="{TemplateBinding BorderThickness}" x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Margin="0">
<Border Margin="0,0,0,-1" x:Name="innerBorder" Background="White" Opacity="0"/>
<Border Margin="0,0,0,-1" x:Name="innerBorder" Background="{DynamicResource RegionBrush}" Opacity="0"/>
</Border>
<ContentPresenter Grid.Column="0" x:Name="contentPresenter" ContentSource="Header" Focusable="False" HorizontalAlignment="Stretch" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center">
<ContentPresenter.OpacityMask>
@@ -89,7 +89,7 @@
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
<RowDefinition x:Name="RowDefinition1" Height="*"/>
</Grid.RowDefinitions>
<Border Background="White" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}">
<Border Background="{DynamicResource RegionBrush}" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}">
<controls:TabPanel MinHeight="{TemplateBinding TabItemHeight}" TabItemHeight="{TemplateBinding TabItemHeight}" TabItemWidth="{TemplateBinding TabItemWidth}" IsEnableTabFill="{TemplateBinding IsEnableTabFill}" Margin="0,0,-1,-1" x:Name="PART_HeaderPanel" HorizontalAlignment="Left" Background="{DynamicResource SecondaryTextBrush}" IsItemsHost="true" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1">
<interactivity:Interaction.Behaviors>
<interactivity:FluidMoveBehavior AppliesTo="Children" Duration="{Binding FluidMoveDuration,ElementName=PART_HeaderPanel}">
@@ -100,10 +100,10 @@
</interactivity:Interaction.Behaviors>
</controls:TabPanel>
</Border>
<Border x:Name="contentPanel" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<Border x:Name="contentPanel" Background="{DynamicResource SecondaryRegionBrush}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
<Border Visibility="{Binding Visibility,ElementName=PART_OverflowButton}" Margin="0,-1,0,0" Grid.Row="0" Grid.Column="0" BorderThickness="1,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Background="White" HorizontalAlignment="Right">
<Border Visibility="{Binding Visibility,ElementName=PART_OverflowButton}" Margin="0,-1,0,0" Grid.Row="0" Grid.Column="0" BorderThickness="1,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Right">
<controls:ContextMenuToggleButton x:Name="PART_OverflowButton" Visibility="Collapsed" Style="{StaticResource ToggleButtonIconTransparent}" controls:IconSwitchElement.Geometry="{StaticResource DownGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"/>
</Border>
</Grid>
@@ -125,7 +125,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
<Grid x:Name="templateRoot" Background="White" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid x:Name="templateRoot" Background="{DynamicResource RegionBrush}" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0"/>
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
+6 -6
View File
@@ -33,23 +33,23 @@
</Style>
<Style x:Key="TextBlockLarge" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="{DynamicResource LargeFontSize}"/>
<Setter Property="FontSize" Value="{StaticResource LargeFontSize}"/>
</Style>
<Style x:Key="TextBlockTitle" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="{DynamicResource HeadFontSize}"/>
<Setter Property="FontSize" Value="{StaticResource HeadFontSize}"/>
</Style>
<Style x:Key="TextBlockSubTitle" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="{DynamicResource SubHeadFontSize}"/>
<Setter Property="FontSize" Value="{StaticResource SubHeadFontSize}"/>
</Style>
<Style x:Key="TextBlockLargeBold" BasedOn="{StaticResource TextBlockBoldBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="{DynamicResource LargeFontSize}"/>
<Setter Property="FontSize" Value="{StaticResource LargeFontSize}"/>
</Style>
<Style x:Key="TextBlockTitleBold" BasedOn="{StaticResource TextBlockBoldBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="{DynamicResource HeadFontSize}"/>
<Setter Property="FontSize" Value="{StaticResource HeadFontSize}"/>
</Style>
<Style x:Key="TextBlockSubTitleBold" BasedOn="{StaticResource TextBlockBoldBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="{DynamicResource SubHeadFontSize}"/>
<Setter Property="FontSize" Value="{StaticResource SubHeadFontSize}"/>
</Style>
<Style x:Key="TextBlockDefaultBold" BasedOn="{StaticResource TextBlockBoldBaseStyle}" TargetType="{x:Type TextBlock}"/>
+4 -5
View File
@@ -4,7 +4,6 @@
xmlns:system="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Converters.xaml"/>
<ResourceDictionary Source="Base/TextBoxBaseStyle.xaml"/>
<ResourceDictionary Source="TextBlock.xaml"/>
</ResourceDictionary.MergedDictionaries>
@@ -20,7 +19,7 @@
<RowDefinition Height="{Binding Path=(controls:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}"/>
</Grid.RowDefinitions>
<StackPanel Visibility="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="7,4">
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
<TextBlock Foreground="{DynamicResource PrimaryTextBrush}" Margin="1,0,0,0" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
</StackPanel>
<Border x:Name="border" Grid.Row="1" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
@@ -32,7 +31,7 @@
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true" SourceName="PART_ContentHost">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource SecondaryBorderBrush}"/>
</Trigger>
<Trigger Property="IsFocused" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
@@ -47,7 +46,7 @@
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel Visibility="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,8">
<TextBlock Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
<TextBlock Foreground="{DynamicResource PrimaryTextBrush}" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
</StackPanel>
<Border x:Name="border" Grid.Column="1" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
@@ -59,7 +58,7 @@
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true" SourceName="PART_ContentHost">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource SecondaryBorderBrush}"/>
</Trigger>
<Trigger Property="IsFocused" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
+2 -3
View File
@@ -3,7 +3,6 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Paths.xaml"/>
<ResourceDictionary Source="../Basic/Converters.xaml"/>
<ResourceDictionary Source="Button.xaml"/>
</ResourceDictionary.MergedDictionaries>
@@ -12,7 +11,7 @@
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="BorderThickness" Value="0,1,0,0"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background" Value="Black"/>
<Setter Property="Background" Value="{DynamicResource TitleBrush}"/>
<Setter Property="Height" Value="60"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Template">
@@ -39,7 +38,7 @@
</EventTrigger>
</ControlTemplate.Triggers>
<Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
<Grid>
<Grid ClipToBounds="True">
<Border BorderThickness="0,0,0,4" BorderBrush="White" VerticalAlignment="Top" Height="52">
<TextBlock FontSize="16" Name="PART_TextBlockSelected" VerticalAlignment="Top" Margin="0,14,0,0" HorizontalAlignment="Center"/>
</Border>
+4 -5
View File
@@ -6,7 +6,6 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Converters.xaml"/>
<ResourceDictionary Source="Base/TimePickerBaseStyle.xaml"/>
<ResourceDictionary Source="TextBlock.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource TimePickerBaseStyle}" TargetType="controls:TimePicker"/>
@@ -28,7 +27,7 @@
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<Button Style="{StaticResource ButtonIcon}" Padding="7" controls:IconElement.Geometry="{StaticResource ClockGeometry}" x:Name="PART_Button" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" Focusable="False" Grid.Row="0"/>
<controls:WatermarkTextBox x:Name="PART_TextBox" Padding="5,6" Margin="0,0,0,1" Watermark="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<controls:WatermarkTextBox CaretBrush="{TemplateBinding Foreground}" x:Name="PART_TextBox" Padding="5,6" Margin="0,0,0,1" Watermark="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Popup Grid.Column="0" VerticalOffset="1" x:Name="PART_Popup" PopupAnimation="Fade" Placement="Bottom" PlacementTarget="{Binding ElementName=PART_TextBox}" StaysOpen="False">
<controls:Clock x:Name="PART_Clock" ShowConfirmButton="True"/>
</Popup>
@@ -44,7 +43,7 @@
<Condition Property="IsMouseOver" Value="true" SourceName="templateRoot"/>
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
@@ -79,7 +78,7 @@
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<Button Style="{StaticResource ButtonIcon}" Padding="7" controls:IconElement.Geometry="{StaticResource ClockGeometry}" x:Name="PART_Button" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" Focusable="False" Grid.Row="0"/>
<controls:WatermarkTextBox x:Name="PART_TextBox" Padding="5,6" Margin="0,0,0,1" Watermark="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<controls:WatermarkTextBox CaretBrush="{TemplateBinding Foreground}" x:Name="PART_TextBox" Padding="5,6" Margin="0,0,0,1" Watermark="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Popup Grid.Column="0" VerticalOffset="1" x:Name="PART_Popup" PopupAnimation="Fade" Placement="Bottom" PlacementTarget="{Binding ElementName=PART_TextBox}" StaysOpen="False">
<controls:Clock x:Name="PART_Clock" ShowConfirmButton="True"/>
</Popup>
@@ -95,7 +94,7 @@
<Condition Property="IsMouseOver" Value="true" SourceName="templateRoot"/>
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
+2 -2
View File
@@ -8,7 +8,7 @@
<!--普通-->
<Style BasedOn="{StaticResource ToggleButtonBaseStyle}" TargetType="{x:Type ToggleButton}">
<Setter Property="Background" Value="{DynamicResource DefaultBrush}"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Style.Triggers>
@@ -44,7 +44,7 @@
<!--图标-->
<Style x:Key="ToggleButtonIcon" BasedOn="{StaticResource ToggleButtonIconBaseStyle}" TargetType="{x:Type ToggleButton}">
<Setter Property="Background" Value="{DynamicResource DefaultBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource ReverseTextBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
+5 -6
View File
@@ -83,11 +83,11 @@
<Condition Property="IsSelected" Value="true"/>
<Condition Property="IsSelectionActive" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}"/>
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource DarkDefaultBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
</MultiTrigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
<Setter Property="Foreground" Value="{StaticResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -96,11 +96,10 @@
</Style>
<Style TargetType="{x:Type TreeView}" BasedOn="{StaticResource BaseStyle}">
<Setter Property="Background" Value="{DynamicResource TextIconBrush}"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
@@ -118,7 +117,7 @@
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
<Setter Property="Background" TargetName="Bd" Value="{StaticResource {x:Static SystemColors.ControlBrushKey}}"/>
</Trigger>
<Trigger Property="VirtualizingPanel.IsVirtualizing" Value="true">
<Setter Property="CanContentScroll" TargetName="_tv_scrollviewer_" Value="true"/>
+10 -18
View File
@@ -19,10 +19,10 @@
</Style>
<Style x:Key="CustomWindowStyle" BasedOn="{x:Null}" TargetType="controls:WindowBorderless">
<Setter Property="Background" Value="White"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="NonClientAreaBackground" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="NonClientAreaBackground" Value="{DynamicResource TitleBrush}"/>
<Setter Property="NonClientAreaForeground" Value="White"/>
<Setter Property="CloseButtonHoverBrush" Value="Red"/>
<Setter Property="CloseButtonHoverForeground" Value="White"/>
@@ -133,7 +133,7 @@
<Setter Property="ShowInTaskbar" Value="False"/>
<Setter Property="MinWidth" Value="300"/>
<Setter Property="ResizeMode" Value="NoResize"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="SizeToContent" Value="WidthAndHeight"/>
<Setter Property="Effect">
<Setter.Value>
@@ -150,30 +150,22 @@
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Name="TitleGrid" Height="30" Background="{DynamicResource PrimaryBrush}">
<Grid Name="TitleGrid" Height="30" Background="{DynamicResource TitleBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Name="PART_TitleBlock" Background="Transparent" Padding="10,6" FontSize="14" Foreground="White" Text="{TemplateBinding Title}" VerticalAlignment="Center" TextWrapping="Wrap" TextTrimming="WordEllipsis"/>
<TextBlock Name="PART_TitleBlock" Background="Transparent" Padding="10,6" Foreground="White" Text="{TemplateBinding Title}" VerticalAlignment="Center" TextWrapping="Wrap" TextTrimming="WordEllipsis"/>
<Button Margin="0,0,1,0" Background="Transparent" Name="CloseButton" Foreground="White" Grid.Column="1" controls:BackgroundSwitchElement.MouseHoverBackground="Red" controls:BackgroundSwitchElement.MouseDownBackground="Red" Command="interactivity:ControlCommands.Close" IsCancel="True" Height="28" Style="{StaticResource ButtonCustom}" Width="44" controls:IconElement.Geometry="{StaticResource CloseGeometry}" Padding="9">
<Path Fill="{Binding ElementName=CloseButton,Path=Foreground}" Style="{StaticResource ClosePathStyle}"/>
</Button>
</Grid>
<Border BorderBrush="{DynamicResource PrimaryBrush}" Name="PART_MainBorder" Grid.Row="1">
<Border BorderBrush="{DynamicResource TitleBrush}" Name="PART_MainBorder" Grid.Row="1">
<StackPanel>
<TextBlock Text="{TemplateBinding ContentStr}" MinHeight="110" Name="MyTextBlock" TextAlignment="Center" FontSize="16" Padding="32" Foreground="#252525" MaxWidth="300" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Background="White"/>
<StackPanel Margin="0,0,0,32" Orientation="Horizontal" Background="White" HorizontalAlignment="Center">
<Button Command="interactivity:ControlCommands.Cancel" Visibility="{TemplateBinding ShowCancel,Converter={StaticResource Boolean2VisibilityConverter}}" Margin="0,0,16,0" Background="Transparent" Style="{StaticResource ButtonCustom}">
<Border BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}" MinWidth="80" Height="30" CornerRadius="4" Background="White">
<TextBlock Text="{x:Static langs:Lang.Cancel}" Foreground="{DynamicResource PrimaryBrush}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</Button>
<Button IsDefault="True" Command="interactivity:ControlCommands.Confirm" Background="Transparent" Style="{StaticResource ButtonCustom}">
<Border MinWidth="80" Height="30" CornerRadius="4" Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.Confirm}" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</Button>
<TextBlock Text="{TemplateBinding ContentStr}" MinHeight="110" Name="MyTextBlock" TextAlignment="Center" Padding="32" Foreground="{DynamicResource PrimaryTextBrush}" MaxWidth="300" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Background="{TemplateBinding Background}"/>
<StackPanel Margin="0,0,0,32" Orientation="Horizontal" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Center">
<Button IsCancel="True" MinWidth="80" Command="interactivity:ControlCommands.Cancel" Content="{x:Static langs:Lang.Cancel}" Visibility="{TemplateBinding ShowCancel,Converter={StaticResource Boolean2VisibilityConverter}}" Margin="0,0,16,0"/>
<Button IsDefault="True" MinWidth="80" Command="interactivity:ControlCommands.Confirm" Content="{x:Static langs:Lang.Confirm}" Style="{StaticResource ButtonPrimary}"/>
</StackPanel>
</StackPanel>
</Border>
File renamed without changes.
+26 -1
View File
@@ -1,6 +1,9 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Windows;
using HandyControl.Data.Enum;
namespace HandyControl.Tools
{
@@ -38,5 +41,27 @@ namespace HandyControl.Tools
/// <param name="key"></param>
/// <returns></returns>
public static T GetResource<T>(string key) where T : class => Application.Current.TryFindResource(key) as T;
/// <summary>
/// 获取HandyControl皮肤
/// </summary>
/// <param name="skin"></param>
/// <returns></returns>
public static ResourceDictionary GetSkin(SkinType skin) => new ResourceDictionary
{
Source = new Uri($"pack://application:,,,/HandyControl;component/Themes/Skin{skin.ToString()}.xaml")
};
/// <summary>
/// 获取皮肤
/// </summary>
/// <param name="assembly"></param>
/// <param name="themePath"></param>
/// <param name="skin"></param>
/// <returns></returns>
public static ResourceDictionary GetSkin(Assembly assembly, string themePath, SkinType skin) => new ResourceDictionary
{
Source = new Uri($"pack://application:,,,/{assembly.GetName().Name};component/{themePath}/Skin{skin.ToString()}.xaml")
};
}
}