工具栏整理

This commit is contained in:
艾竹
2023-04-02 12:01:46 +08:00
parent 02ebd056b3
commit 0701f25519
30 changed files with 1730 additions and 923 deletions

View File

@@ -32,7 +32,9 @@
<dd:LineDashConverter x:Key="LineDashConverter"/>
<dd:DoubleToThickness x:Key="DoubleToThickness"/>
<dd:ObjectConverter x:Key="ObjectConverter"/>
<dd:MindThemeFillBrushConverter x:Key="MindThemeFillBrushConverter"/>
<dd:MindThemeFontBrushConverter x:Key="MindThemeFontBrushConverter"/>
<converter:NumberConverter x:Key="NumberConverter"/>
<converter:Boolean2VisibilityReConverter x:Key="Boolean2VisibilityReConverter"/>
<converter:NullableToVisibilityConverter x:Key="NullableToVisibilityConverter"/>
@@ -1160,7 +1162,7 @@
<StackPanel>
<TextBlock Text="箭头样式" Margin="5"/>
<StackPanel Orientation="Horizontal">
<Fluent:ComboBox Size="Small" Width="140" Margin="5" IsEditable="False" helper:EnumHelper.Enum="{x:Type dd:ArrowPathStyle}" SelectedItem="{Binding ShapeViewModel.SourceMarker.PathStyle}">
<Fluent:ComboBox Size="Small" Width="140" Margin="5" IsEditable="False" dd:EnumHelper.Enum="{x:Type dd:ArrowPathStyle}" SelectedItem="{Binding ShapeViewModel.SourceMarker.PathStyle}">
<Fluent:ComboBox.ItemTemplate>
<DataTemplate>
<DockPanel>
@@ -1187,7 +1189,7 @@
</Fluent:ComboBox.ItemTemplate>
</Fluent:ComboBox>
<Fluent:ComboBox Size="Small" Width="140" Margin="5" IsEditable="False" helper:EnumHelper.Enum="{x:Type dd:ArrowPathStyle}" SelectedItem="{Binding ShapeViewModel.SinkMarker.PathStyle}">
<Fluent:ComboBox Size="Small" Width="140" Margin="5" IsEditable="False" dd:EnumHelper.Enum="{x:Type dd:ArrowPathStyle}" SelectedItem="{Binding ShapeViewModel.SinkMarker.PathStyle}">
<Fluent:ComboBox.ItemTemplate>
<DataTemplate>
<DockPanel>
@@ -1224,14 +1226,14 @@
<StackPanel>
<TextBlock Text="箭头样式" Margin="5"/>
<StackPanel Orientation="Horizontal">
<Fluent:ComboBox Size="Small" Width="140" Margin="5" IsEditable="False" helper:EnumHelper.Enum="{x:Type dd:ArrowSizeStyle}" SelectedItem="{Binding ShapeViewModel.SourceMarker.SizeStyle}">
<Fluent:ComboBox Size="Small" Width="140" Margin="5" IsEditable="False" dd:EnumHelper.Enum="{x:Type dd:ArrowSizeStyle}" SelectedItem="{Binding ShapeViewModel.SourceMarker.SizeStyle}">
<Fluent:ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding .,Converter={StaticResource EnumDescriptionConverter}}" />
</DataTemplate>
</Fluent:ComboBox.ItemTemplate>
</Fluent:ComboBox>
<Fluent:ComboBox Size="Small" Width="140" Margin="5" IsEditable="False" helper:EnumHelper.Enum="{x:Type dd:ArrowSizeStyle}" SelectedItem="{Binding ShapeViewModel.SinkMarker.SizeStyle}">
<Fluent:ComboBox Size="Small" Width="140" Margin="5" IsEditable="False" dd:EnumHelper.Enum="{x:Type dd:ArrowSizeStyle}" SelectedItem="{Binding ShapeViewModel.SinkMarker.SizeStyle}">
<Fluent:ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding .,Converter={StaticResource EnumDescriptionConverter}}" />
@@ -1244,7 +1246,7 @@
<StackPanel Orientation="Horizontal">
<StackPanel>
<TextBlock Text="线条样式" Margin="5"/>
<Fluent:ComboBox Size="Small" Width="140" Margin="5" IsEditable="False" helper:EnumHelper.Enum="{x:Type dd:LineDashStyle}" SelectedItem="{Binding ColorViewModel.LineDashStyle}">
<Fluent:ComboBox Size="Small" Width="140" Margin="5" IsEditable="False" dd:EnumHelper.Enum="{x:Type dd:LineDashStyle}" SelectedItem="{Binding ColorViewModel.LineDashStyle}">
<Fluent:ComboBox.ItemTemplate>
<DataTemplate>
<DockPanel>
@@ -1259,7 +1261,7 @@
</StackPanel>
<StackPanel>
<TextBlock Text="线条动画" Margin="5"/>
<Fluent:ComboBox Size="Small" Width="140" Margin="5" IsEditable="False" helper:EnumHelper.Enum="{x:Type dd:LineAnimation}" SelectedItem="{Binding ColorViewModel.LineAnimation}">
<Fluent:ComboBox Size="Small" Width="140" Margin="5" IsEditable="False" dd:EnumHelper.Enum="{x:Type dd:LineAnimation}" SelectedItem="{Binding ColorViewModel.LineAnimation}">
<Fluent:ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding .,Converter={StaticResource EnumDescriptionConverter}}" />
@@ -1515,7 +1517,7 @@
<TextBlock Text="S" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="9"/>
</Grid>
</Fluent:SplitButton.LargeIcon>
<ListBox BorderThickness="0" helper:EnumHelper.Enum="{x:Type dd:PageSizeType}" SelectedItem="{Binding PageViewModel.DiagramViewModel.PageSizeType}">
<ListBox BorderThickness="0" dd:EnumHelper.Enum="{x:Type dd:PageSizeType}" SelectedItem="{Binding PageViewModel.DiagramViewModel.PageSizeType}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding .,Converter={StaticResource EnumDescriptionConverter}}" Margin="5"/>
@@ -1532,7 +1534,7 @@
<Fluent:SplitButton.LargeIcon>
<iconPacks:PackIconMaterial Kind="PhoneRotateLandscape" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Fluent:SplitButton.LargeIcon>
<ListBox BorderThickness="0" helper:EnumHelper.Enum="{x:Type dd:PageSizeOrientation}" SelectedItem="{Binding PageViewModel.DiagramViewModel.PageSizeOrientation}">
<ListBox BorderThickness="0" dd:EnumHelper.Enum="{x:Type dd:PageSizeOrientation}" SelectedItem="{Binding PageViewModel.DiagramViewModel.PageSizeOrientation}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding .,Converter={StaticResource EnumDescriptionConverter}}" Margin="5"/>
@@ -1549,7 +1551,7 @@
<Fluent:SplitButton.LargeIcon>
<iconPacks:PackIconMaterial Kind="RulerSquare" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Fluent:SplitButton.LargeIcon>
<ListBox BorderThickness="0" helper:EnumHelper.Enum="{x:Type dd:PageUnit}" SelectedItem="{Binding PageViewModel.DiagramViewModel.PageUnit}">
<ListBox BorderThickness="0" dd:EnumHelper.Enum="{x:Type dd:PageUnit}" SelectedItem="{Binding PageViewModel.DiagramViewModel.PageUnit}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding .,Converter={StaticResource EnumDescriptionConverter}}" Margin="5"/>
@@ -2165,50 +2167,58 @@
</Border>
</Fluent:RibbonGroupBox>
<Fluent:RibbonGroupBox Header="外观" IsLauncherVisible="True">
<Fluent:SplitButton Header="{Binding PageViewModel.DiagramViewModel.MindType,Converter={StaticResource EnumDescriptionConverter}}" Width="70" VerticalAlignment="Top">
<Fluent:SplitButton Header="{Binding ElementName=mindtype,Path=SelectedItem,Converter={StaticResource EnumDescriptionConverter}}" GroupName="MindType" Width="70" VerticalAlignment="Top">
<Fluent:SplitButton.LargeIcon>
<Grid>
<iconPacks:PackIconRemixIcon Kind="MindMap" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<iconPacks:PackIconRemixIcon Kind="MindMap" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Fluent:SplitButton.LargeIcon>
<Fluent:MenuItem Header="思维导图" Size="Small" IsCheckable="True" IsChecked="{Binding PageViewModel.DiagramViewModel.MindType,Converter={dd:ConverterValueMapToBool Parameter='Mind'}, ConverterParameter='Mind'}"/>
<Fluent:MenuItem Header="目录组织图" Size="Small" IsCheckable="True" IsChecked="{Binding PageViewModel.DiagramViewModel.MindType,Converter={dd:ConverterValueMapToBool Parameter='Directory'}, ConverterParameter='Directory'}"/>
<Fluent:MenuItem Header="鱼骨头图" Size="Small" IsCheckable="True" IsChecked="{Binding PageViewModel.DiagramViewModel.MindType,Converter={dd:ConverterValueMapToBool Parameter='FishBone'}, ConverterParameter='FishBone'}"/>
<Fluent:MenuItem Header="逻辑结构图" Size="Small" IsCheckable="True" IsChecked="{Binding PageViewModel.DiagramViewModel.MindType,Converter={dd:ConverterValueMapToBool Parameter='Logical'}, ConverterParameter='Logical'}"/>
<Fluent:MenuItem Header="组织结构图" Size="Small" IsCheckable="True" IsChecked="{Binding PageViewModel.DiagramViewModel.MindType,Converter={dd:ConverterValueMapToBool Parameter='Organizational'}, ConverterParameter='Organizational'}"/>
<Fluent:MenuItem Header="天盘图" Size="Small" IsCheckable="True" IsEnabled="False" ToolTip="暂未完成" IsChecked="{Binding PageViewModel.DiagramViewModel.MindType,Converter={dd:ConverterValueMapToBool Parameter='Celestial'}, ConverterParameter='Celestial'}"/>
<ListBox x:Name="mindtype" Width="140" dd:EnumHelper.Enum="{x:Type dd:MindType}" SelectedItem="{Binding PageViewModel.DiagramViewModel.MindType,Mode=OneWay}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding .,Converter={StaticResource EnumDescriptionConverter}}" />
</DataTemplate>
</ListBox.ItemTemplate>
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding PageViewModel.DiagramViewModel.ChangeMindTypeCommand}" CommandParameter="{Binding ElementName=mindtype,Path=SelectedItem}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</ListBox>
<Fluent:SplitButton.ToolTip>
<Fluent:ScreenTip Title="MindType"
Text="脑图类型"
Width="190" />
</Fluent:SplitButton.ToolTip>
</Fluent:SplitButton>
<Fluent:SplitButton Header="{Binding PageViewModel.DiagramViewModel.MindThemeModel.Name}" Width="50" VerticalAlignment="Top">
<Fluent:SplitButton Header="{Binding ElementName=mindtheme,Path=SelectedItem,Converter={StaticResource EnumDescriptionConverter}}" Width="50" VerticalAlignment="Top">
<Fluent:SplitButton.LargeIcon>
<Grid>
<Border Width="18" Height="18" Background="{Binding PageViewModel.DiagramViewModel.MindThemeModel.MindThemeLevel1.FillColor,Converter={StaticResource ColorBrushConverter}}" CornerRadius="3"/>
</Grid>
<iconPacks:PackIconUnicons Kind="Palette" Foreground="{Binding PageViewModel.DiagramViewModel.MindTheme,Converter={StaticResource MindThemeFillBrushConverter}}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Fluent:SplitButton.LargeIcon>
<Fluent:MenuItem Header="天空蓝" Size="Small" Background="#73a1bf" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="天空蓝"/>
<Fluent:MenuItem Header="紧凑蓝" Size="Small" Background="#73a1bf" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="紧凑蓝"/>
<Fluent:MenuItem Header="文艺绿" Size="Small" Background="#73bf76" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="文艺绿"/>
<Fluent:MenuItem Header="紧凑绿" Size="Small" Background="#73bf76" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="紧凑绿"/>
<Fluent:MenuItem Header="脑残粉" Size="Small" Background="#bf7394" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="脑残粉"/>
<Fluent:MenuItem Header="紧凑粉" Size="Small" Background="#bf7394" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="紧凑粉"/>
<Fluent:MenuItem Header="浪漫紫" Size="Small" Background="#7b73bf" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="浪漫紫"/>
<Fluent:MenuItem Header="紧凑紫" Size="Small" Background="#7b73bf" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="紧凑紫"/>
<Fluent:MenuItem Header="清新红" Size="Small" Background="#bf7373" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="清新红"/>
<Fluent:MenuItem Header="紧凑红" Size="Small" Background="#bf7373" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="紧凑红"/>
<Fluent:MenuItem Header="泥土黄" Size="Small" Background="#bf9373" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="泥土黄"/>
<Fluent:MenuItem Header="紧凑黄" Size="Small" Background="#bf9373" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="紧凑黄"/>
<Fluent:MenuItem Header="冷光黄" Size="Small" Background="#e9df98" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="冷光黄"/>
<Fluent:MenuItem Header="紧凑黄" Size="Small" Background="#e9df98" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="紧凑冷"/>
<ListBox x:Name="mindtheme" dd:EnumHelper.Enum="{x:Type dd:MindTheme}" SelectedItem="{Binding PageViewModel.DiagramViewModel.MindTheme,Mode=OneWay}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="2"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Border CornerRadius="3" Background="{Binding .,Converter={StaticResource MindThemeFillBrushConverter}}" Padding="5">
<TextBlock Foreground="{Binding .,Converter={StaticResource MindThemeFontBrushConverter}}" Text="{Binding .,Converter={StaticResource EnumDescriptionConverter}}" VerticalAlignment="Center" />
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="{Binding ElementName=mindtheme,Path=SelectedItem}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</ListBox>
<Fluent:SplitButton.ToolTip>
<Fluent:ScreenTip Title="Theme"
Text="主题"
Width="190" />
</Fluent:SplitButton.ToolTip>
</Fluent:SplitButton>
</Fluent:SplitButton>
<Fluent:Button Header="整理布局" Width="50" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.ResetLayoutCommand}">
<Fluent:Button.LargeIcon>
<Path Width="15" Height="15" Stretch="Uniform" Fill="Black" Data="M358.4 0a102.4 102.4 0 0 1 102.4 102.4v819.2a102.4 102.4 0 0 1-102.4 102.4H102.4a102.4 102.4 0 0 1-102.4-102.4V102.4a102.4 102.4 0 0 1 102.4-102.4h256z m0 76.8H102.4a25.6 25.6 0 0 0-25.1904 20.992L76.8 102.4v819.2a25.6 25.6 0 0 0 20.992 25.1904L102.4 947.2h256a25.6 25.6 0 0 0 25.1904-20.992L384 921.6V102.4a25.6 25.6 0 0 0-20.992-25.1904L358.4 76.8z m268.288 547.84a38.4 38.4 0 0 1 50.1248-1.8432l4.1472 3.8912a38.4 38.4 0 0 1 1.8432 50.1248L630.272 742.4h333.7216l4.6592 0.3584c16.7936 2.56 29.696 18.5856 29.696 38.0416 0 21.1968-15.36 38.4-34.3552 38.4h-333.6704l52.4288 65.6384 3.2256 4.6592a38.4 38.4 0 0 1-63.232 43.3152l-102.4-128-3.328-4.9152a38.4 38.4 0 0 1 3.328-43.0592l102.4-128zM921.6 0a102.4 102.4 0 0 1 102.4 102.4v256a102.4 102.4 0 0 1-102.4 102.4h-256a102.4 102.4 0 0 1-102.4-102.4V102.4a102.4 102.4 0 0 1 102.4-102.4h256z m0 76.8h-256a25.6 25.6 0 0 0-25.1904 20.992L640 102.4v256a25.6 25.6 0 0 0 20.992 25.1904L665.6 384h256a25.6 25.6 0 0 0 25.1904-20.992L947.2 358.4V102.4a25.6 25.6 0 0 0-20.992-25.1904L921.6 76.8z"></Path>
@@ -2454,7 +2464,7 @@
</dragablz:TabablzControl>
<DockPanel Grid.Row="1" >
<Fluent:ComboBox Size="Small" IsEditable="False" helper:EnumHelper.Enum="{x:Type model:ColorType}" SelectedItem="{Binding ColorType}" BorderThickness="0" BorderBrush="Transparent" Background="Transparent" Template="{StaticResource ComboboxControlTemplate1}" >
<Fluent:ComboBox Size="Small" IsEditable="False" dd:EnumHelper.Enum="{x:Type model:ColorType}" SelectedItem="{Binding ColorType}" BorderThickness="0" BorderBrush="Transparent" Background="Transparent" Template="{StaticResource ComboboxControlTemplate1}" >
<Fluent:ComboBox.ItemTemplate>
<DataTemplate>
<iconPacks:PackIconMaterial x:Name="icon" Kind="FormatColorText" Width="12" Height="12" Margin="2"/>