暂存一下

This commit is contained in:
艾竹
2023-03-11 12:40:44 +08:00
parent 5cfb32bb19
commit 84f413320f
18 changed files with 763 additions and 144 deletions

View File

@@ -7,6 +7,47 @@
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Mind;component/Styles/ContextMenu.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style x:Key="MenuItemStyle" TargetType="{x:Type MenuItem}">
<Setter Property="Padding" Value="6"/>
<Setter Property="Background" Value="Transparent" />
<Setter Property="ScrollViewer.PanningMode" Value="Both" />
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
<Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type MenuItem}">
<Grid Margin="{TemplateBinding Margin}" SnapsToDevicePixels="True">
<Border x:Name="templateRoot"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="True" />
<Border x:Name="BackgroundRoot"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="LightGray"
SnapsToDevicePixels="True"
Opacity="0" />
<ContentPresenter Margin="{TemplateBinding Padding}" VerticalAlignment="Center" HorizontalAlignment="Center" ContentSource="Header" RecognizesAccessKey="True"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="BackgroundRoot" Property="Opacity" Value="0.5" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="BackgroundRoot" Property="Opacity" Value="1" />
<Setter TargetName="BackgroundRoot" Property="Background" Value="#73a1bf" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value=".5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="AIStudio.Styles.DropDownButton" TargetType="{x:Type controls:DropDownButton}">
<Setter Property="ArrowBrush" Value="Black" />
<Setter Property="ArrowMouseOverBrush"
@@ -21,6 +62,7 @@
<Setter Property="Foreground" Value="Black" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="MenuStyle" Value="{StaticResource ContextMenuStyle}" />
<Setter Property="ItemContainerStyle" Value="{StaticResource MenuItemStyle}" />
<Setter Property="MinHeight" Value="26" />
<Setter Property="Padding" Value="3" />
<Setter Property="SnapsToDevicePixels" Value="True" />