结构调整,便于后续扩展

This commit is contained in:
akwkevin
2021-07-29 13:55:18 +08:00
parent 87be7a8021
commit 336249f313
121 changed files with 430 additions and 2165 deletions

View File

@@ -6,18 +6,18 @@
xmlns:local="clr-namespace:AIStudio.Wpf.ADiagram"
xmlns:Fluent="urn:fluent-ribbon"
xmlns:utilhandy="https://astudio.github.io/utilcontrol.handy"
xmlns:controls="clr-namespace:AIStudio.Wpf.ADiagram.Controls"
xmlns:controls="clr-namespace:AIStudio.Wpf.BaseDiagram.Controls;assembly=AIStudio.Wpf.BaseDiagram"
xmlns:views="clr-namespace:AIStudio.Wpf.ADiagram.Views"
xmlns:binding="clr-namespace:AIStudio.Wpf.ADiagram.Commands"
xmlns:binding="clr-namespace:AIStudio.Wpf.BaseDiagram.Commands;assembly=AIStudio.Wpf.BaseDiagram"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:controlzEx="urn:controlzex"
xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
xmlns:helper="clr-namespace:AIStudio.Wpf.ADiagram.Helpers"
xmlns:enum="clr-namespace:AIStudio.Wpf.ADiagram.Enums"
xmlns:helper="clr-namespace:AIStudio.Wpf.BaseDiagram.Helpers;assembly=AIStudio.Wpf.BaseDiagram"
xmlns:model="clr-namespace:AIStudio.Wpf.ADiagram.Models"
xmlns:dd="https://astudio.github.io/diagram"
xmlns:drop="urn:gong-wpf-dragdrop"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:converter="clr-namespace:AIStudio.Wpf.ADiagram.Converters"
xmlns:converter="clr-namespace:AIStudio.Wpf.BaseDiagram.Converters;assembly=AIStudio.Wpf.BaseDiagram"
xmlns:viewmodel="clr-namespace:AIStudio.Wpf.ADiagram.ViewModels"
Style="{StaticResource RibbonWindowStyle}"
Icon="pack://application:,,,/AIStudio.Wpf.ADiagram;component/Icons/App.ico"
@@ -1658,7 +1658,7 @@
</dragablz:TabablzControl>
<DockPanel Grid.Row="1" >
<Fluent:ComboBox Size="Small" IsEditable="False" helper:EnumHelper.Enum="{x:Type enum:ColorType}" SelectedItem="{Binding ColorType}" BorderThickness="0" BorderBrush="Transparent" Background="Transparent" Template="{StaticResource ComboboxControlTemplate1}" >
<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.ItemTemplate>
<DataTemplate>
<iconPacks:PackIconMaterial x:Name="icon" Kind="FormatColorText" Width="12" Height="12" Margin="2"/>

View File

@@ -4,13 +4,13 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:Fluent="urn:fluent-ribbon"
xmlns:controls="clr-namespace:AIStudio.Wpf.ADiagram.Controls"
xmlns:controls="clr-namespace:AIStudio.Wpf.BaseDiagram.Controls;assembly=AIStudio.Wpf.BaseDiagram"
xmlns:views="clr-namespace:AIStudio.Wpf.ADiagram.Views"
xmlns:converter="clr-namespace:AIStudio.Wpf.ADiagram.Converters"
xmlns:helper="clr-namespace:AIStudio.Wpf.ADiagram.Helpers"
xmlns:converter="clr-namespace:AIStudio.Wpf.BaseDiagram.Converters;assembly=AIStudio.Wpf.BaseDiagram"
xmlns:helper="clr-namespace:AIStudio.Wpf.BaseDiagram.Helpers;assembly=AIStudio.Wpf.BaseDiagram"
xmlns:dd="https://astudio.github.io/diagram"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:flowchart="clr-namespace:AIStudio.Wpf.ADiagram.Demos.Flowchart"
xmlns:flowchart="clr-namespace:AIStudio.Wpf.Flowchart;assembly=AIStudio.Wpf.Flowchart"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>

View File

@@ -3,13 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:AIStudio.Wpf.ADiagram.Controls"
xmlns:views="clr-namespace:AIStudio.Wpf.ADiagram.Views"
xmlns:viewmodels="clr-namespace:AIStudio.Wpf.ADiagram.ViewModels"
xmlns:model="clr-namespace:AIStudio.Wpf.ADiagram.Models"
xmlns:dd="https://astudio.github.io/diagram"
xmlns:conventer="clr-namespace:AIStudio.Wpf.ADiagram.Converters"
xmlns:command="clr-namespace:AIStudio.Wpf.ADiagram.Commands"
xmlns:conventer="clr-namespace:AIStudio.Wpf.BaseDiagram.Converters;assembly=AIStudio.Wpf.BaseDiagram"
xmlns:command="clr-namespace:AIStudio.Wpf.BaseDiagram.Commands;assembly=AIStudio.Wpf.BaseDiagram"
xmlns:svg="clr-namespace:Svg2XamlTestExtension;assembly=Svg2XamlTestExtension"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
@@ -18,7 +17,7 @@
<conventer:StringPathConverter x:Key="stringPathConverter"/>
<conventer:IntVisibilityConverter x:Key="IntVisibilityConverter"/>
<command:CommandReference x:Key="DeleteItemCommandReference" Command="{Binding DeleteItemCommand}"/>
<DataTemplate DataType="{x:Type model:ImageToolBoxData}">
<Grid Width="{Binding Width}" Height="{Binding Height}">
<Rectangle Name="Border"
@@ -147,7 +146,7 @@
TextDecorations="{Binding FontViewModel.TextDecorations}"
HorizontalContentAlignment="{Binding FontViewModel.HorizontalAlignment}"
VerticalContentAlignment="{Binding FontViewModel.VerticalAlignment}"
TextBlock.LineHeight="{Binding FontViewModel.LineHeight}"/>
TextBlock.LineHeight="{Binding FontViewModel.LineHeight}"/>
</Grid>
</Viewbox>
@@ -158,6 +157,26 @@
</Trigger>
</DataTemplate.Triggers>
</DataTemplate>
<DataTemplate DataType="{x:Type model:FlowchartToolBoxData}">
<Grid Width="{Binding Width}" Height="{Binding Height}">
<Rectangle Name="Border"
StrokeThickness="1"
StrokeDashArray="2"
Fill="Transparent"
SnapsToDevicePixels="true"/>
<Viewbox Stretch="Fill">
<Grid>
<ContentControl Style="{StaticResource CustomFlowNodeStyle}" Margin="2"/>
<TextBlock Text="{Binding Text}" Margin="5" Foreground="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}" HorizontalAlignment="Left" />
</Grid>
</Viewbox>
</Grid>
<DataTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="Border" Property="Stroke" Value="Gray"/>
</Trigger>
</DataTemplate.Triggers>
</DataTemplate>
<DataTemplate DataType="{x:Type viewmodels:ToolBoxCategory}">
<Grid Visibility="{Binding IsChecked,Converter={StaticResource boolToVisibilityConverter}}">