chore: update MainContent.
This commit is contained in:
1 parent
bec25d7f64
commit
34054286e7
2 files changed
+56
-56
No files matched your search
@@ -1,34 +1,30 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension">
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit" xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
|
||||
<ResourceDictionary Source="../Basic/Fonts.xaml"/>
|
||||
<ResourceDictionary Source="../Basic/Geometries.xaml" />
|
||||
<ResourceDictionary Source="../Basic/Fonts.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="CirclePanelButton" BasedOn="{StaticResource ButtonCustom}" TargetType="Button">
|
||||
<Setter Property="UseLayoutRounding" Value="False"/>
|
||||
<Setter Property="Height" Value="77"/>
|
||||
<Setter Property="Width" Value="36.06"/>
|
||||
<Setter Property="UseLayoutRounding" Value="False" />
|
||||
<Setter Property="Height" Value="77" />
|
||||
<Setter Property="Width" Value="36.06" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<hc:SimplePanel>
|
||||
<Path Data="{StaticResource CirclePanelDemoGeometry}" Fill="{DynamicResource PrimaryBrush}" Height="77" Width="36.06"/>
|
||||
<Path Data="{StaticResource CirclePanelRightGeometry}" Stretch="Uniform" Margin="12" Fill="White"/>
|
||||
<Path Data="{StaticResource CirclePanelDemoGeometry}" Fill="{DynamicResource PrimaryBrush}" Height="77" Width="36.06" />
|
||||
<Path Data="{StaticResource CirclePanelRightGeometry}" Stretch="Uniform" Margin="12" Fill="White" />
|
||||
</hc:SimplePanel>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Opacity" Value=".9"/>
|
||||
<Setter Property="Opacity" Value=".9" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Opacity" Value=".6"/>
|
||||
<Setter Property="Opacity" Value=".6" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value="0.4"/>
|
||||
<Setter Property="Opacity" Value="0.4" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -37,48 +33,48 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TabItemTransparent" BasedOn="{StaticResource TabItemInLine}" TargetType="TabItem">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ListBoxItemTransparent" BasedOn="{StaticResource ListBoxItemBaseStyle}" TargetType="ListBoxItem">
|
||||
<Setter Property="Visibility" Value="{Binding IsVisible,Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Visibility" Value="{Binding IsVisible,Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ListBoxTransparent" BasedOn="{StaticResource ListBoxBaseStyle}" TargetType="ListBox">
|
||||
<Setter Property="hc:BorderElement.CornerRadius" Value="4"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemTransparent}"/>
|
||||
<Setter Property="hc:ScrollViewer.IsInertiaEnabled" Value="True"/>
|
||||
<Setter Property="hc:BorderElement.CornerRadius" Value="4" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemTransparent}" />
|
||||
<Setter Property="hc:ScrollViewer.IsInertiaEnabled" Value="True" />
|
||||
</Style>
|
||||
|
||||
<ItemsPanelTemplate x:Key="FluidMoveBehaviorWrapPanelItemsPanelTemplate">
|
||||
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center" hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}"/>
|
||||
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center" hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}" />
|
||||
</ItemsPanelTemplate>
|
||||
|
||||
<Style x:Key="MessageBoxCustom" TargetType="hc:MessageBox" BasedOn="{StaticResource {x:Type hc:MessageBox}}">
|
||||
<Setter Property="NonClientAreaBackground" Value="#262e2f"/>
|
||||
<Setter Property="OtherButtonHoverBackground" Value="#888580"/>
|
||||
<Setter Property="OtherButtonForeground" Value="White"/>
|
||||
<Setter Property="OtherButtonHoverForeground" Value="White"/>
|
||||
<Setter Property="NonClientAreaForeground" Value="White"/>
|
||||
<Setter Property="CloseButtonForeground" Value="White"/>
|
||||
<Setter Property="Icon" Value="/HandyControlDemo;component/Resources/Img/icon.ico"/>
|
||||
<Setter Property="NonClientAreaBackground" Value="#262e2f" />
|
||||
<Setter Property="OtherButtonHoverBackground" Value="#888580" />
|
||||
<Setter Property="OtherButtonForeground" Value="White" />
|
||||
<Setter Property="OtherButtonHoverForeground" Value="White" />
|
||||
<Setter Property="NonClientAreaForeground" Value="White" />
|
||||
<Setter Property="CloseButtonForeground" Value="White" />
|
||||
<Setter Property="Icon" Value="/HandyControlDemo;component/Resources/Img/icon.ico" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TextBlockFabricIcons" TargetType="TextBlock">
|
||||
<Setter Property="FontFamily" Value="{StaticResource FabricIcons}"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="FontFamily" Value="{StaticResource FabricIcons}" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="hc:Sprite" BasedOn="{StaticResource {x:Type hc:Sprite}}">
|
||||
<Setter Property="Padding" Value="25"/>
|
||||
<Setter Property="Padding" Value="25" />
|
||||
</Style>
|
||||
|
||||
<Storyboard x:Key="Custom1Transition" x:Shared="False">
|
||||
<DoubleAnimation From="50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<ElasticEase Oscillations="1"/>
|
||||
<ElasticEase Oscillations="1" />
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
</Storyboard>
|
||||
@@ -86,7 +82,7 @@
|
||||
<Storyboard x:Key="Custom2Transition" x:Shared="False">
|
||||
<DoubleAnimation From="10" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<ElasticEase Oscillations="1"/>
|
||||
<ElasticEase Oscillations="1" />
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
</Storyboard>
|
||||
@@ -94,19 +90,19 @@
|
||||
<Storyboard x:Key="Custom3Transition" x:Shared="False">
|
||||
<DoubleAnimation From=".8" To="1" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<ElasticEase Oscillations="1"/>
|
||||
<ElasticEase Oscillations="1" />
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
</Storyboard>
|
||||
|
||||
<Style x:Key="TextEditorCustom" TargetType="avalonedit:TextEditor">
|
||||
<Setter Property="IsReadOnly" Value="True"/>
|
||||
<Setter Property="FontFamily" Value="Consolas"/>
|
||||
<Setter Property="Margin" Value="4"/>
|
||||
<Setter Property="ShowLineNumbers" Value="True"/>
|
||||
<Setter Property="LineNumbersForeground" Value="{DynamicResource EditorLineNumbersForeground}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource EditorForeground}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||
<Setter Property="IsReadOnly" Value="True" />
|
||||
<Setter Property="FontFamily" Value="Consolas" />
|
||||
<Setter Property="Margin" Value="4" />
|
||||
<Setter Property="ShowLineNumbers" Value="True" />
|
||||
<Setter Property="LineNumbersForeground" Value="{DynamicResource EditorLineNumbersForeground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource EditorForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="avalonedit:TextEditor">
|
||||
@@ -158,18 +154,18 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Path4GeometryItem" TargetType="Path">
|
||||
<Setter Property="Margin" Value="10"/>
|
||||
<Setter Property="Data" Value="{Binding Info.Data,RelativeSource={RelativeSource AncestorType=Border}}"/>
|
||||
<Setter Property="Fill" Value="{DynamicResource PrimaryBrush}"/>
|
||||
<Setter Property="Width" Value="20"/>
|
||||
<Setter Property="Height" Value="20"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Stretch" Value="Uniform"/>
|
||||
<Setter Property="Margin" Value="10" />
|
||||
<Setter Property="Data" Value="{Binding Info.Data,RelativeSource={RelativeSource AncestorType=Border}}" />
|
||||
<Setter Property="Fill" Value="{DynamicResource PrimaryBrush}" />
|
||||
<Setter Property="Width" Value="20" />
|
||||
<Setter Property="Height" Value="20" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Stretch" Value="Uniform" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Info.Line,RelativeSource={RelativeSource AncestorType=Border}}" Value="True">
|
||||
<Setter Property="Fill" Value="{x:Null}"/>
|
||||
<Setter Property="Stroke" Value="{DynamicResource PrimaryBrush}"/>
|
||||
<Setter Property="Fill" Value="{x:Null}" />
|
||||
<Setter Property="Stroke" Value="{DynamicResource PrimaryBrush}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
@@ -179,12 +175,16 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="GroupItem">
|
||||
<hc:SimpleStackPanel>
|
||||
<hc:Divider Content="{ex:Lang Key={Binding Name}}" LineStrokeDashArray="2, 2" Padding="16,0" Margin="0,16,0,10"/>
|
||||
<ItemsPresenter Margin="{TemplateBinding Padding}"/>
|
||||
<hc:Divider Content="{ex:Lang Key={Binding Name}}" LineStrokeDashArray="2, 2" Padding="16,0" Margin="0,16,0,10" />
|
||||
<ItemsPresenter Margin="{TemplateBinding Padding}" />
|
||||
</hc:SimpleStackPanel>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TabControl.PreviewCode" BasedOn="{StaticResource TabControlInLine}" TargetType="TabControl">
|
||||
<Setter Property="BorderThickness" Value="0 1 0 0" />
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -109,7 +109,7 @@ public partial class MainContent
|
||||
|
||||
BorderCode.Child = new TabControl
|
||||
{
|
||||
Style = ResourceHelper.GetResource<Style>("TabControlInLine"),
|
||||
Style = ResourceHelper.GetResource<Style>("TabControl.PreviewCode"),
|
||||
Items =
|
||||
{
|
||||
new TabItem
|
||||
|
||||
Reference in new issue
Block a user