mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-02 15:16:37 +08:00
工具栏整理
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.Mind.Controls"
|
||||
xmlns:models="clr-namespace:AIStudio.Wpf.Mind.Models"
|
||||
xmlns:converter="clr-namespace:AIStudio.Wpf.Mind.Converters"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800" >
|
||||
<UserControl.Resources>
|
||||
@@ -13,11 +15,14 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<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 Source="pack://application:,,,/AIStudio.Wpf.Mind;component/Styles/ComboBox.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Mind;component/Controls/DropDownButton.xaml" />
|
||||
<ResourceDictionary>
|
||||
<dd:ColorBrushConverter x:Key="ColorBrushConverter"/>
|
||||
<dd:EnumDescriptionConverter x:Key="EnumDescriptionConverter"/>
|
||||
<dd:ObjectConverter x:Key="ObjectConverter"/>
|
||||
<converter:MindThemeFillBrushConverter x:Key="MindThemeFillBrushConverter"/>
|
||||
<converter:MindThemeFontBrushConverter x:Key="MindThemeFontBrushConverter"/>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
@@ -411,50 +416,33 @@
|
||||
</TabItem>
|
||||
<TabItem Header="外观" Height="30" Width="50">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<controls:DropDownButton>
|
||||
<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'}" />
|
||||
<MenuItem Header="鱼骨头图" IsCheckable="True" IsChecked="{Binding MindType,Converter={dd:ConverterValueMapToBool Parameter='FishBone'}, ConverterParameter='FishBone'}" />
|
||||
<MenuItem Header="逻辑结构图" IsCheckable="True" IsChecked="{Binding MindType,Converter={dd:ConverterValueMapToBool Parameter='Logical'}, ConverterParameter='Logical'}" />
|
||||
<MenuItem Header="组织结构图" IsCheckable="True" IsChecked="{Binding MindType,Converter={dd:ConverterValueMapToBool Parameter='Organizational'}, ConverterParameter='Organizational'}" />
|
||||
<MenuItem Header="天盘图" IsCheckable="True" IsEnabled="False" ToolTip="暂未完成" IsChecked="{Binding MindType,Converter={dd:ConverterValueMapToBool Parameter='Celestial'}, ConverterParameter='Celestial'}" />
|
||||
</controls:DropDownButton.Items>
|
||||
</controls:DropDownButton>
|
||||
<ComboBox x:Name="mindtype" dd:EnumHelper.Enum="{x:Type models:MindType}" SelectedItem="{Binding MindType, Mode=OneWay}" Style="{StaticResource FlatComboBoxStyle}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding .,Converter={StaticResource EnumDescriptionConverter}}" VerticalAlignment="Center" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<i:InvokeCommandAction Command="{Binding ChangeMindTypeCommand}" CommandParameter="{Binding ElementName=mindtype,Path=SelectedItem}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</ComboBox>
|
||||
<Line Margin="2,0" X1="0" Y1="0" X2="0" Y2="100" StrokeDashArray="1" Stroke="Gray" StrokeThickness="1"></Line>
|
||||
<controls:DropDownButton>
|
||||
<controls:DropDownButton.Content>
|
||||
<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>
|
||||
<UniformGrid Columns="2"/>
|
||||
</ItemsPanelTemplate>
|
||||
</controls:DropDownButton.ItemsPanel>
|
||||
<controls:DropDownButton.Items>
|
||||
<MenuItem Header="天空蓝" Background="#73a1bf" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="天空蓝"/>
|
||||
<MenuItem Header="紧凑蓝" Background="#73a1bf" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="紧凑蓝"/>
|
||||
<MenuItem Header="文艺绿" Background="#73bf76" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="文艺绿"/>
|
||||
<MenuItem Header="紧凑绿" Background="#73bf76" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="紧凑绿"/>
|
||||
<MenuItem Header="脑残粉" Background="#bf7394" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="脑残粉"/>
|
||||
<MenuItem Header="紧凑粉" Background="#bf7394" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="紧凑粉"/>
|
||||
<MenuItem Header="浪漫紫" Background="#7b73bf" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="浪漫紫"/>
|
||||
<MenuItem Header="紧凑紫" Background="#7b73bf" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="紧凑紫"/>
|
||||
<MenuItem Header="清新红" Background="#bf7373" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="清新红"/>
|
||||
<MenuItem Header="紧凑红" Background="#bf7373" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="紧凑红"/>
|
||||
<MenuItem Header="泥土黄" Background="#bf9373" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="泥土黄"/>
|
||||
<MenuItem Header="紧凑黄" Background="#bf9373" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="紧凑黄"/>
|
||||
<MenuItem Header="冷光黄" Background="#e9df98" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="冷光黄"/>
|
||||
<MenuItem Header="紧凑黄" Background="#e9df98" Margin="1.5" Command="{Binding ChangeMindThemeCommand}" CommandParameter="紧凑冷"/>
|
||||
</controls:DropDownButton.Items>
|
||||
</controls:DropDownButton>
|
||||
<ComboBox x:Name="mindtheme" dd:EnumHelper.Enum="{x:Type models:MindTheme}" SelectedItem="{Binding MindTheme, Mode=OneWay}" Style="{StaticResource FlatComboBox2ColumnStyle}">
|
||||
<ComboBox.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>
|
||||
</ComboBox.ItemTemplate>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<i:InvokeCommandAction Command="{Binding ChangeMindThemeCommand}" CommandParameter="{Binding ElementName=mindtheme,Path=SelectedItem}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</ComboBox>
|
||||
<Line Margin="2,0" X1="0" Y1="0" X2="0" Y2="100" StrokeDashArray="1" Stroke="Gray" StrokeThickness="1"></Line>
|
||||
<Button Style="{StaticResource FlatButtonStyle}" Command="{Binding ResetLayoutCommand}">
|
||||
<StackPanel>
|
||||
@@ -499,12 +487,12 @@
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ComboBox x:Name="comboBoxFontName"
|
||||
Width="80"
|
||||
BorderBrush="Gainsboro"
|
||||
Width="100"
|
||||
IsTextSearchEnabled="True"
|
||||
ScrollViewer.CanContentScroll="False"
|
||||
ItemsSource="{Binding SelectedItem.FontViewModel.FontFamilys}"
|
||||
SelectedItem="{Binding SelectedItem.FontViewModel.FontFamily}">
|
||||
SelectedItem="{Binding SelectedItem.FontViewModel.FontFamily}"
|
||||
Style="{StaticResource FlatComboBoxStyle}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}"
|
||||
@@ -515,10 +503,10 @@
|
||||
<ComboBox x:Name="comboBoxFontSize"
|
||||
Width="50"
|
||||
HorizontalAlignment="Left"
|
||||
BorderBrush="Gainsboro"
|
||||
IsEditable="True"
|
||||
ItemsSource="{Binding SelectedItem.FontViewModel.FontSizes}"
|
||||
Text="{Binding SelectedItem.FontViewModel.FontSize}">
|
||||
Text="{Binding SelectedItem.FontViewModel.FontSize}"
|
||||
Style="{StaticResource FlatComboBoxStyle}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}"/>
|
||||
|
||||
Reference in New Issue
Block a user