replace controls with hc

This commit is contained in:
NaBian committed 2020-06-20 18:51:53 +08:00
1 parent f4b1796f98
commit a4de357de1
130 files changed
+1611 -1611

No files matched your search

@@ -1,7 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:langs="clr-namespace:HandyControl.Properties.Langs"
xmlns:controls="clr-namespace:HandyControl.Controls"
xmlns:hc="clr-namespace:HandyControl.Controls"
xmlns:ex="clr-namespace:HandyControl.Tools.Extension"
xmlns:themes="clr-namespace:HandyControl.Themes">
@@ -11,7 +11,7 @@
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/ListBoxBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="ClockRadioButtonStyle" TargetType="controls:ClockRadioButton">
<Style x:Key="ClockRadioButtonStyle" TargetType="hc:ClockRadioButton">
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
@@ -22,7 +22,7 @@
<Setter Property="Background" Value="{DynamicResource DangerBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:ClockRadioButton">
<ControlTemplate TargetType="hc:ClockRadioButton">
<ControlTemplate.Resources>
<Storyboard x:Key="Storyboard1">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="optionMark">
@@ -35,10 +35,10 @@
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<controls:SimplePanel x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
<hc:SimplePanel x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
<Ellipse x:Name="optionMark" Fill="{TemplateBinding Background}" MinWidth="6" MinHeight="6" Opacity="0"/>
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</controls:SimplePanel>
</hc:SimplePanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Trigger.EnterActions>
@@ -59,7 +59,7 @@
</Style.Triggers>
</Style>
<Style TargetType="controls:Clock">
<Style TargetType="hc:Clock">
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Focusable" Value="False"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
@@ -69,17 +69,17 @@
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="ClockRadioButtonStyle" Value="{StaticResource ClockRadioButtonStyle}"/>
<Setter Property="controls:TitleElement.Background" Value="{DynamicResource TitleBrush}"/>
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:Clock">
<ControlTemplate TargetType="hc:Clock">
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Background="{Binding Path=(controls:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" Name="PART_BorderTitle">
<Border Background="{Binding Path=(hc:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" Name="PART_BorderTitle">
<TextBlock x:Name="PART_TimeStr" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" Foreground="White"/>
</Border>
<Border Grid.Row="1" Background="{TemplateBinding Background}">
@@ -91,12 +91,12 @@
</Grid.ColumnDefinitions>
<Canvas Grid.ColumnSpan="3" Margin="0,16,0,0" VerticalAlignment="Top" Name="PART_Canvas" Width="178" Height="178">
<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"/>
<hc: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="{ex:Lang Key={x:Static langs:LangKeys.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="{ex:Lang Key={x:Static langs:LangKeys.Pm}}" Style="{StaticResource ClockRadioButtonStyle}"/>
<hc: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="{ex:Lang Key={x:Static langs:LangKeys.Am}}" Style="{StaticResource ClockRadioButtonStyle}"/>
<hc: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="{ex:Lang Key={x:Static langs:LangKeys.Pm}}" Style="{StaticResource ClockRadioButtonStyle}"/>
<Button Grid.Column="1" Visibility="{TemplateBinding ShowConfirmButton,Converter={StaticResource Boolean2VisibilityConverter}}" Name="PART_ButtonConfirm" Content="{ex:Lang Key={x:Static langs:LangKeys.Confirm}}" Foreground="{DynamicResource PrimaryBrush}" HorizontalAlignment="Center" Margin="0,0,0,19" Height="24" Width="60" VerticalAlignment="Bottom" Background="Transparent" Style="{StaticResource ButtonCustom}"/>
</Grid>
</Border>
@@ -119,13 +119,13 @@
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Opacity" Value=".4"/>
</Trigger>
<Trigger Property="controls:EdgeElement.ShowEdgeContent" Value="true">
<Trigger Property="hc:EdgeElement.ShowEdgeContent" Value="true">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<StackPanel Orientation="Horizontal">
<ContentControl Width="16" Height="16" Content="{Binding Path=(controls:EdgeElement.LeftContent),RelativeSource={RelativeSource TemplatedParent}}"/>
<ContentControl Width="16" Height="16" Content="{Binding Path=(hc:EdgeElement.LeftContent),RelativeSource={RelativeSource TemplatedParent}}"/>
<ContentPresenter Margin="6,0,0,0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</StackPanel>
</Border>
@@ -143,7 +143,7 @@
<Setter Property="ItemContainerStyle" Value="{StaticResource ClockListBoxItemStyle}"/>
</Style>
<Style TargetType="controls:ListClock">
<Style TargetType="hc:ListClock">
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Focusable" Value="False"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
@@ -151,10 +151,10 @@
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="controls:TitleElement.Background" Value="{DynamicResource TitleBrush}"/>
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:ListClock">
<ControlTemplate TargetType="hc:ListClock">
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
<Grid>
<Grid.ColumnDefinitions>