工具栏调整下

This commit is contained in:
艾竹
2023-03-12 23:26:22 +08:00
parent f22d6dd3f1
commit 414eb28867
2 changed files with 31 additions and 35 deletions

View File

@@ -13,6 +13,10 @@
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Mind;component/Styles/Button.xaml" />
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Mind;component/Styles/ToggleButton.xaml" />
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Mind;component/Controls/DropDownButton.xaml" />
<ResourceDictionary>
<dd:ColorBrushConverter x:Key="ColorBrushConverter"/>
<dd:EnumDescriptionConverter x:Key="EnumDescriptionConverter"/>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
@@ -339,38 +343,11 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<controls:DropDownButton>
<controls:DropDownButton.Style>
<Style TargetType="{x:Type controls:DropDownButton}" BasedOn="{StaticResource AIStudio.Styles.DropDownButton}">
<Setter Property="Content">
<Setter.Value>
<Path Margin="5" Width="18" Height="18" Stretch="Uniform" Fill="Black" Data="M900 1050C982.85 1050 1050 982.85 1050 900S982.85 750 900 750H750C684.6999999999999 750 629.15 791.7 608.55 850H550C495 850 450 805 450 750V741.45C508.3 720.8499999999999 550 665.3000000000001 550 600C550 534.6999999999999 508.3 479.15 450 458.55V450C450 394.9999999999999 495 350 550 350H608.5C629.1 408.25 684.6999999999999 450 750 450H900C982.85 450 1050 382.85 1050 300S982.85 150 900 150H750C684.6999999999999 150 629.15 191.6999999999999 608.55 250H550C439.5 250 350 339.5 350 450H250C167.15 450 100 517.15 100 600S167.15 750 250 750H350C350 860.5 439.5 950 550 950H608.5C629.1 1008.25 684.6999999999999 1050 750 1050H900zM900 350H750C722.4 350 700 327.6 700 300S722.4 250 750 250H900C927.6 250 950 272.4 950 300S927.6 350 900 350zM400 650H250C222.4 650 200 627.6 200 600S222.4 550 250 550H400C427.6 550 450 572.4 450 600S427.6 650 400 650zM900 950H750C722.4 950 700 927.6 700 900S722.4 850 750 850H900C927.6 850 950 872.4000000000001 950 900S927.6 950 900 950z"></Path>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding MindType}" Value="Mind">
<Setter Property="Content">
<Setter.Value>
<Path Margin="5" Width="18" Height="18" Stretch="Uniform" Fill="Black" Data="M900 1050C982.85 1050 1050 982.85 1050 900S982.85 750 900 750H750C684.6999999999999 750 629.15 791.7 608.55 850H550C495 850 450 805 450 750V741.45C508.3 720.8499999999999 550 665.3000000000001 550 600C550 534.6999999999999 508.3 479.15 450 458.55V450C450 394.9999999999999 495 350 550 350H608.5C629.1 408.25 684.6999999999999 450 750 450H900C982.85 450 1050 382.85 1050 300S982.85 150 900 150H750C684.6999999999999 150 629.15 191.6999999999999 608.55 250H550C439.5 250 350 339.5 350 450H250C167.15 450 100 517.15 100 600S167.15 750 250 750H350C350 860.5 439.5 950 550 950H608.5C629.1 1008.25 684.6999999999999 1050 750 1050H900zM900 350H750C722.4 350 700 327.6 700 300S722.4 250 750 250H900C927.6 250 950 272.4 950 300S927.6 350 900 350zM400 650H250C222.4 650 200 627.6 200 600S222.4 550 250 550H400C427.6 550 450 572.4 450 600S427.6 650 400 650zM900 950H750C722.4 950 700 927.6 700 900S722.4 850 750 850H900C927.6 850 950 872.4000000000001 950 900S927.6 950 900 950z"></Path>
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding MindType}" Value="Directory">
<Setter Property="Content">
<Setter.Value>
<Path Margin="5" Width="18" Height="18" Stretch="Uniform" Fill="Black" Data="M1024 320v256h-704v-64h-128v192h576v256h-768v-256h128v-640h192v-128h704v256h-704v-64h-128v320h128v-128z"></Path>
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger Binding="{Binding MindType}" Value="Organizational">
<Setter Property="Content">
<Setter.Value>
<Path Margin="5" Width="18" Height="18" Stretch="Uniform" Fill="Black" Data="M928 192v288h-384v224h96v256h-256v-256h96v-224h-384v-288h-96v-256h256v256h-96v224h320v-224h-96v-256h256v256h-96v224h320v-224h-96v-256h256v256z"></Path>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</controls:DropDownButton.Style>
<controls:DropDownButton.Content>
<Border CornerRadius="3">
<TextBlock Margin="5" Width="60" TextAlignment="Center" Text="{Binding MindType,Converter={StaticResource EnumDescriptionConverter}}"></TextBlock>
</Border>
</controls:DropDownButton.Content>
<controls:DropDownButton.Items>
<MenuItem Header="思维导图" IsCheckable="True" IsChecked="{Binding MindType,Converter={dd:ConverterValueMapToBool Parameter='Mind'}, ConverterParameter='Mind'}" />
<MenuItem Header="目录组织图" IsCheckable="True" IsChecked="{Binding MindType,Converter={dd:ConverterValueMapToBool Parameter='Directory'}, ConverterParameter='Directory'}" />
@@ -383,9 +360,9 @@
<Line Grid.Column="1" X1="0" Y1="0" X2="0" Y2="100" StrokeDashArray="1" Stroke="Gray" StrokeThickness="1"></Line>
<controls:DropDownButton Grid.Column="2">
<controls:DropDownButton.Content>
<StackPanel>
<TextBlock>主题</TextBlock>
</StackPanel>
<Border Background="{Binding MindThemeModel.MindThemeLevel1.FillColor,Converter={StaticResource ColorBrushConverter}}" CornerRadius="3">
<TextBlock Margin="5" Text="{Binding MindThemeModel.Name}"></TextBlock>
</Border>
</controls:DropDownButton.Content>
<controls:DropDownButton.ItemsPanel>
<ItemsPanelTemplate>