mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-03 15:46:36 +08:00
Mind Editoe
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
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:s="clr-namespace:AIStudio.Wpf.DiagramDesigner"
|
||||
xmlns:dd="clr-namespace:AIStudio.Wpf.DiagramDesigner"
|
||||
xmlns:c="clr-namespace:AIStudio.Wpf.DiagramDesigner.Controls"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
@@ -15,16 +15,16 @@
|
||||
<ResourceDictionary Source="/AIStudio.Wpf.DiagramDesigner;component/Themes/Generic.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
<s:ColorBrushConverter x:Key="ColorBrushConverter" />
|
||||
<s:ConectorOrientationConverter x:Key="ConectorOrientationConverter" />
|
||||
<s:ConectorValueConverter x:Key="ConectorValueConverter"/>
|
||||
<s:ArrowPathConverter x:Key="ArrowPathConverter"/>
|
||||
<s:ArrowSizeConverter x:Key="ArrowSizeConverter"/>
|
||||
<s:LineDashConverter x:Key="LineDashConverter"/>
|
||||
<s:ClipConverter x:Key="ClipConverter"/>
|
||||
<s:InvertBoolConverter x:Key="InvertBoolConverter"/>
|
||||
<s:ConectorStyleConverter x:Key="ConectorStyleConverter"/>
|
||||
<s:NotNullOrEmptyToBoolConverter x:Key="NotNullOrEmptyToBoolConverter"/>
|
||||
<dd:ColorBrushConverter x:Key="ColorBrushConverter" />
|
||||
<dd:ConectorOrientationConverter x:Key="ConectorOrientationConverter" />
|
||||
<dd:ConectorValueConverter x:Key="ConectorValueConverter"/>
|
||||
<dd:ArrowPathConverter x:Key="ArrowPathConverter"/>
|
||||
<dd:ArrowSizeConverter x:Key="ArrowSizeConverter"/>
|
||||
<dd:LineDashConverter x:Key="LineDashConverter"/>
|
||||
<dd:ClipConverter x:Key="ClipConverter"/>
|
||||
<dd:InvertBoolConverter x:Key="InvertBoolConverter"/>
|
||||
<dd:ConectorStyleConverter x:Key="ConectorStyleConverter"/>
|
||||
<dd:NotNullOrEmptyToBoolConverter x:Key="NotNullOrEmptyToBoolConverter"/>
|
||||
|
||||
<!-- ResizeDecorator Default Template -->
|
||||
<!--
|
||||
@@ -145,7 +145,7 @@
|
||||
|
||||
<ObjectDataProvider x:Key="ConnectorOrientationMenu" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
|
||||
<ObjectDataProvider.MethodParameters>
|
||||
<x:Type TypeName="s:ConnectorOrientation" />
|
||||
<x:Type TypeName="dd:ConnectorOrientation" />
|
||||
</ObjectDataProvider.MethodParameters>
|
||||
</ObjectDataProvider>
|
||||
|
||||
@@ -157,11 +157,11 @@
|
||||
</Style>
|
||||
|
||||
<!-- Connector Style -->
|
||||
<Style x:Key="PointConnectorStyle" TargetType="{x:Type s:PointConnector}">
|
||||
<Style x:Key="PointConnectorStyle" TargetType="{x:Type dd:PointConnector}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="true" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type s:PointConnector}">
|
||||
<ControlTemplate TargetType="{x:Type dd:PointConnector}">
|
||||
<Grid Width="{Binding ConnectorWidth}" Height="{Binding ConnectorHeight}">
|
||||
<!-- transparent extra space makes connector easier to hit -->
|
||||
<Ellipse Fill="Transparent" Margin="-2" />
|
||||
@@ -172,7 +172,7 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="GifImageConnectorContainer" TargetType="{x:Type s:ConnectorContainer}">
|
||||
<Style x:Key="GifImageConnectorContainer" TargetType="{x:Type dd:ConnectorContainer}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ItemsControl}">
|
||||
@@ -182,7 +182,7 @@
|
||||
</Border>
|
||||
<Rectangle Fill="#7F243859" Opacity="0.5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Visibility="{Binding ShouldInsertAnchor, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<i:Interaction.Behaviors>
|
||||
<s:ControlMouseLeftButtonDownCommandBehavior Command="{Binding AddItemCommand}" />
|
||||
<dd:ControlMouseLeftButtonDownCommandBehavior Command="{Binding AddItemCommand}" />
|
||||
</i:Interaction.Behaviors>
|
||||
</Rectangle>
|
||||
</Grid>
|
||||
@@ -208,87 +208,87 @@
|
||||
<ControlTemplate x:Key="ConnectorDecoratorTemplate"
|
||||
TargetType="{x:Type Control}">
|
||||
<Grid Margin="-5">
|
||||
<s:Connector
|
||||
<dd:Connector
|
||||
Content="{Binding LeftConnector}"
|
||||
Cursor="Cross"
|
||||
SnapsToDevicePixels="True"
|
||||
Orientation="Left"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static dd:BoolToVisibilityConverter.Instance}}" />
|
||||
<dd:Connector
|
||||
Content="{Binding TopLeftConnector}"
|
||||
Cursor="Cross"
|
||||
SnapsToDevicePixels="True"
|
||||
Orientation="TopLeft"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Left"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static dd:BoolToVisibilityConverter.Instance}}" />
|
||||
<dd:Connector
|
||||
Content="{Binding TopConnector}"
|
||||
Cursor="Cross"
|
||||
SnapsToDevicePixels="True"
|
||||
Orientation="Top"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Center"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static dd:BoolToVisibilityConverter.Instance}}" />
|
||||
<dd:Connector
|
||||
Content="{Binding TopRightConnector}"
|
||||
Cursor="Cross"
|
||||
SnapsToDevicePixels="True"
|
||||
Orientation="TopRight"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Right"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static dd:BoolToVisibilityConverter.Instance}}" />
|
||||
<dd:Connector
|
||||
Content="{Binding RightConnector}"
|
||||
Cursor="Cross"
|
||||
SnapsToDevicePixels="True"
|
||||
Orientation="Right"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static dd:BoolToVisibilityConverter.Instance}}" />
|
||||
<dd:Connector
|
||||
Content="{Binding BottomRightConnector}"
|
||||
Cursor="Cross"
|
||||
SnapsToDevicePixels="True"
|
||||
Orientation="BottomRight"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Right"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static dd:BoolToVisibilityConverter.Instance}}" />
|
||||
<dd:Connector
|
||||
Content="{Binding BottomConnector}"
|
||||
Cursor="Cross"
|
||||
SnapsToDevicePixels="True"
|
||||
Orientation="Bottom"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Center"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static dd:BoolToVisibilityConverter.Instance}}" />
|
||||
<dd:Connector
|
||||
Content="{Binding BottomLeftConnector}"
|
||||
Cursor="Cross"
|
||||
SnapsToDevicePixels="True"
|
||||
Orientation="BottomLeft"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Left"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static dd:BoolToVisibilityConverter.Instance}}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="InnerConnectorDecoratorTemplate"
|
||||
TargetType="{x:Type Control}">
|
||||
<s:ConnectorContainer x:Name="PART_ConnectorContainer" Style="{StaticResource ItemsControlStyle}" ItemsSource="{Binding Connectors}" Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}">
|
||||
<s:ConnectorContainer.ItemTemplate>
|
||||
<dd:ConnectorContainer x:Name="PART_ConnectorContainer" Style="{StaticResource ItemsControlStyle}" ItemsSource="{Binding Connectors}" Visibility="{Binding Path=ShowConnectors, Converter={x:Static dd:BoolToVisibilityConverter.Instance}}">
|
||||
<dd:ConnectorContainer.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<s:Connector
|
||||
<dd:Connector
|
||||
Content="{Binding .}"
|
||||
Cursor="Cross"
|
||||
SnapsToDevicePixels="True"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</s:ConnectorContainer.ItemTemplate>
|
||||
</s:ConnectorContainer>
|
||||
</dd:ConnectorContainer.ItemTemplate>
|
||||
</dd:ConnectorContainer>
|
||||
</ControlTemplate>
|
||||
|
||||
<!--基础类型-->
|
||||
@@ -300,9 +300,9 @@
|
||||
Value="{Binding Top}" />
|
||||
<Setter Property="Canvas.ZIndex"
|
||||
Value="{Binding ZIndex}" />
|
||||
<Setter Property="s:SelectionProps.EnabledForSelection"
|
||||
<Setter Property="dd:SelectionProps.EnabledForSelection"
|
||||
Value="{Binding EnabledForSelection}" />
|
||||
<Setter Property="s:ItemConnectProps.EnabledForConnection"
|
||||
<Setter Property="dd:ItemConnectProps.EnabledForConnection"
|
||||
Value="{Binding EnabledForConnection}" />
|
||||
<Setter Property="Visibility"
|
||||
Value="{Binding Visible,Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||
@@ -368,7 +368,7 @@
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<s:TextControl x:Name="PART_Text" />
|
||||
<dd:TextControl x:Name="PART_Text" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
@@ -377,7 +377,7 @@
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<s:TextControl x:Name="PART_Text" />
|
||||
<dd:TextControl x:Name="PART_Text" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
@@ -459,7 +459,7 @@
|
||||
Value="{Binding Area.Left}" />
|
||||
<Setter Property="Canvas.ZIndex"
|
||||
Value="{Binding ZIndex}" />
|
||||
<Setter Property="s:SelectionProps.EnabledForSelection"
|
||||
<Setter Property="dd:SelectionProps.EnabledForSelection"
|
||||
Value="{Binding EnabledForSelection}" />
|
||||
<Setter Property="Visibility"
|
||||
Value="{Binding Visible,Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||
@@ -475,11 +475,11 @@
|
||||
<ContextMenu>
|
||||
<MenuItem Header="删除" Command="{Binding DeleteConnectionCommand}" CommandParameter="{Binding}"/>
|
||||
<MenuItem Header="添加文本" Command="{Binding AddLabelCommand}" CommandParameter="{Binding}"/>
|
||||
<MenuItem Header="插入点(按住ctrl可一直插入)" IsCheckable="True" IsChecked="{Binding ShouldInsertAnchor}" IsEnabled="{Binding IsReadOnly,Converter={s:InvertBoolConverter}}" />
|
||||
<MenuItem Header="插入点(按住ctrl可一直插入)" IsCheckable="True" IsChecked="{Binding ShouldInsertAnchor}" IsEnabled="{Binding IsReadOnly,Converter={dd:InvertBoolConverter}}" />
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
|
||||
<s:LineControl x:Name="line"/>
|
||||
<dd:LineControl x:Name="line"/>
|
||||
|
||||
<!-- PART_DragThumb -->
|
||||
<c:DragThumb x:Name="PART_DragThumb" Margin="8"
|
||||
@@ -489,8 +489,8 @@
|
||||
</c:DragThumb.InputBindings>
|
||||
</c:DragThumb>
|
||||
|
||||
<s:PointContainer x:Name="PART_VerticesContainer" Style="{StaticResource ItemsControlStyle}" ItemsSource="{Binding Vertices}" Visibility="Collapsed">
|
||||
<s:PointContainer.ItemTemplate>
|
||||
<dd:PointContainer x:Name="PART_VerticesContainer" Style="{StaticResource ItemsControlStyle}" ItemsSource="{Binding Vertices}" Visibility="Collapsed">
|
||||
<dd:PointContainer.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ContextMenu>
|
||||
@@ -498,23 +498,23 @@
|
||||
<MenuItem Header="删除" Command="{Binding DeleteVertexCommand}" CommandParameter="{Binding}"/>
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
<s:PointConnector Style="{StaticResource PointConnectorStyle}"/>
|
||||
<dd:PointConnector Style="{StaticResource PointConnectorStyle}"/>
|
||||
<c:PointDragThumb Cursor="SizeAll" Opacity="0"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</s:PointContainer.ItemTemplate>
|
||||
<s:PointContainer.Resources>
|
||||
</dd:PointContainer.ItemTemplate>
|
||||
<dd:PointContainer.Resources>
|
||||
<Style TargetType="{x:Type ContentPresenter}">
|
||||
<Setter Property="Canvas.Left" Value="{Binding Left}" />
|
||||
<Setter Property="Canvas.Top" Value="{Binding Top}" />
|
||||
</Style>
|
||||
</s:PointContainer.Resources>
|
||||
</s:PointContainer>
|
||||
</dd:PointContainer.Resources>
|
||||
</dd:PointContainer>
|
||||
|
||||
<s:PointContainer x:Name="PART_LabelsContainer" Style="{StaticResource ItemsControlStyle}" ItemsSource="{Binding Labels}" >
|
||||
<s:PointContainer.ItemTemplate>
|
||||
<dd:PointContainer x:Name="PART_LabelsContainer" Style="{StaticResource ItemsControlStyle}" ItemsSource="{Binding Labels}" >
|
||||
<dd:PointContainer.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid s:SelectionProps.EnabledForSelection="True" Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}">
|
||||
<Grid dd:SelectionProps.EnabledForSelection="True" Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}">
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="删除" Command="{Binding DeleteLabelCommand}" CommandParameter="{Binding}"/>
|
||||
@@ -525,21 +525,21 @@
|
||||
<MouseBinding MouseAction="LeftDoubleClick" Command="{Binding EditCommand}" CommandParameter="{Binding }" />
|
||||
</c:PointDragThumb.InputBindings>
|
||||
</c:PointDragThumb>
|
||||
<s:TextControl Margin="5" />
|
||||
<dd:TextControl Margin="5" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</s:PointContainer.ItemTemplate>
|
||||
<s:PointContainer.Resources>
|
||||
</dd:PointContainer.ItemTemplate>
|
||||
<dd:PointContainer.Resources>
|
||||
<Style TargetType="{x:Type ContentPresenter}">
|
||||
<Setter Property="Canvas.Left" Value="{Binding Left}" />
|
||||
<Setter Property="Canvas.Top" Value="{Binding Top}" />
|
||||
</Style>
|
||||
</s:PointContainer.Resources>
|
||||
</s:PointContainer>
|
||||
</dd:PointContainer.Resources>
|
||||
</dd:PointContainer>
|
||||
|
||||
<Rectangle Fill="#7F243859" Opacity="0.5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Visibility="{Binding ShouldInsertAnchor, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<i:Interaction.Behaviors>
|
||||
<s:ControlMouseLeftButtonDownCommandBehavior Command="{Binding AddVertexCommand}" />
|
||||
<dd:ControlMouseLeftButtonDownCommandBehavior Command="{Binding AddVertexCommand}" />
|
||||
</i:Interaction.Behaviors>
|
||||
</Rectangle>
|
||||
</Grid>
|
||||
@@ -572,9 +572,9 @@
|
||||
Value="{Binding Left}" />
|
||||
<Setter Property="Canvas.ZIndex"
|
||||
Value="{Binding ZIndex}" />
|
||||
<Setter Property="s:SelectionProps.EnabledForSelection"
|
||||
<Setter Property="dd:SelectionProps.EnabledForSelection"
|
||||
Value="{Binding EnabledForSelection}" />
|
||||
<Setter Property="s:ItemConnectProps.EnabledForConnection"
|
||||
<Setter Property="dd:ItemConnectProps.EnabledForConnection"
|
||||
Value="{Binding EnabledForConnection}" />
|
||||
<Setter Property="Visibility"
|
||||
Value="{Binding Visible,Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||
@@ -608,13 +608,13 @@
|
||||
VerticalAlignment="Stretch"
|
||||
Content="{TemplateBinding Content}" />
|
||||
<!-- PART_ConnectorDecorator -->
|
||||
<s:ConnectorContainer x:Name="PART_ConnectorContainer" Visibility="Hidden" Style="{StaticResource GifImageConnectorContainer}" ItemsSource="{Binding Connectors}">
|
||||
<s:ConnectorContainer.ItemTemplate>
|
||||
<dd:ConnectorContainer x:Name="PART_ConnectorContainer" Visibility="Hidden" Style="{StaticResource GifImageConnectorContainer}" ItemsSource="{Binding Connectors}">
|
||||
<dd:ConnectorContainer.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<s:Connector Content="{Binding .}" Cursor="Cross" SnapsToDevicePixels="True"/>
|
||||
<dd:Connector Content="{Binding .}" Cursor="Cross" SnapsToDevicePixels="True"/>
|
||||
</DataTemplate>
|
||||
</s:ConnectorContainer.ItemTemplate>
|
||||
</s:ConnectorContainer>
|
||||
</dd:ConnectorContainer.ItemTemplate>
|
||||
</dd:ConnectorContainer>
|
||||
<Grid.RenderTransform>
|
||||
<TransformGroup>
|
||||
<RotateTransform Angle="{Binding Angle}" />
|
||||
@@ -652,9 +652,9 @@
|
||||
Value="{Binding Left}" />
|
||||
<Setter Property="Canvas.ZIndex"
|
||||
Value="{Binding ZIndex}" />
|
||||
<Setter Property="s:SelectionProps.EnabledForSelection"
|
||||
<Setter Property="dd:SelectionProps.EnabledForSelection"
|
||||
Value="{Binding EnabledForSelection}" />
|
||||
<Setter Property="s:ItemConnectProps.EnabledForConnection"
|
||||
<Setter Property="dd:ItemConnectProps.EnabledForConnection"
|
||||
Value="{Binding EnabledForConnection}" />
|
||||
<Setter Property="Visibility"
|
||||
Value="{Binding Visible,Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||
@@ -685,15 +685,15 @@
|
||||
</Grid.ContextMenu>
|
||||
|
||||
<!--PART_ConnectorDecorator-->
|
||||
<s:ConnectorContainer x:Name="PART_ConnectorContainer" Style="{StaticResource ItemsControlStyle}" ItemsSource="{Binding Connectors}" Margin="0,0,0,0">
|
||||
<s:ConnectorContainer.ItemTemplate>
|
||||
<dd:ConnectorContainer x:Name="PART_ConnectorContainer" Style="{StaticResource ItemsControlStyle}" ItemsSource="{Binding Connectors}" Margin="0,0,0,0">
|
||||
<dd:ConnectorContainer.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<s:Connector Content="{Binding .}" Cursor="Cross" SnapsToDevicePixels="True"/>
|
||||
<dd:Connector Content="{Binding .}" Cursor="Cross" SnapsToDevicePixels="True"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</s:ConnectorContainer.ItemTemplate>
|
||||
</s:ConnectorContainer>
|
||||
</dd:ConnectorContainer.ItemTemplate>
|
||||
</dd:ConnectorContainer>
|
||||
<!-- PART_DragThumb -->
|
||||
<c:DragThumb x:Name="PART_DragThumb"
|
||||
Cursor="SizeAll" >
|
||||
@@ -733,7 +733,7 @@
|
||||
Value="{Binding Left}" />
|
||||
<Setter Property="Canvas.ZIndex"
|
||||
Value="{Binding ZIndex}" />
|
||||
<Setter Property="s:SelectionProps.EnabledForSelection"
|
||||
<Setter Property="dd:SelectionProps.EnabledForSelection"
|
||||
Value="{Binding EnabledForSelection}" />
|
||||
<Setter Property="Visibility"
|
||||
Value="{Binding Visible,Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||
@@ -746,11 +746,11 @@
|
||||
<Setter Property="ContentTemplate">
|
||||
<Setter.Value>
|
||||
<DataTemplate>
|
||||
<Grid x:Name="selectedGrid" Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}">
|
||||
<Grid x:Name="selectedGrid" Visibility="{Binding Path=ShowConnectors, Converter={x:Static dd:BoolToVisibilityConverter.Instance}}">
|
||||
<!-- PART_ConnectorDecorator -->
|
||||
<Grid Margin="-5"
|
||||
x:Name="PART_ConnectorDecorator">
|
||||
<s:PointConnector DataContext="{Binding TopConnector}" Style="{StaticResource PointConnectorStyle}"/>
|
||||
<dd:PointConnector DataContext="{Binding TopConnector}" Style="{StaticResource PointConnectorStyle}"/>
|
||||
</Grid>
|
||||
<!-- PART_DragThumb -->
|
||||
<c:DragThumb x:Name="PART_DragThumb"
|
||||
@@ -779,9 +779,9 @@
|
||||
Value="{Binding Left}" />
|
||||
<Setter Property="Canvas.ZIndex"
|
||||
Value="{Binding ZIndex}" />
|
||||
<Setter Property="s:SelectionProps.EnabledForSelection"
|
||||
<Setter Property="dd:SelectionProps.EnabledForSelection"
|
||||
Value="{Binding EnabledForSelection}" />
|
||||
<Setter Property="s:ItemConnectProps.EnabledForConnection"
|
||||
<Setter Property="dd:ItemConnectProps.EnabledForConnection"
|
||||
Value="{Binding EnabledForConnection}" />
|
||||
<Setter Property="Visibility"
|
||||
Value="{Binding Visible,Converter={StaticResource BooleanToVisibilityConverter}}"/>
|
||||
@@ -799,12 +799,12 @@
|
||||
<!-- PART_ConnectorDecorator -->
|
||||
<Grid Margin="-5"
|
||||
x:Name="PART_ConnectorDecorator">
|
||||
<s:Connector Content="{Binding Connectors[0]}"
|
||||
<dd:Connector Content="{Binding Connectors[0]}"
|
||||
Cursor="Cross"
|
||||
SnapsToDevicePixels="True"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static dd:BoolToVisibilityConverter.Instance}}" />
|
||||
</Grid>
|
||||
<!-- PART_DragThumb -->
|
||||
<c:DragThumb x:Name="PART_DragThumb"
|
||||
@@ -835,10 +835,10 @@
|
||||
<ControlTemplate>
|
||||
<Grid>
|
||||
<ItemsControl ItemsSource="{Binding Items}"
|
||||
ItemContainerStyleSelector="{x:Static s:DesignerItemsControlItemStyleSelector.Instance}">
|
||||
ItemContainerStyleSelector="{x:Static dd:DesignerItemsControlItemStyleSelector.Instance}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<s:DesignerCanvas
|
||||
<dd:DesignerCanvas
|
||||
Height="{Binding PageSize.Height}"
|
||||
Width="{Binding PageSize.Width}"
|
||||
ShowGrid="{Binding ShowGrid}"
|
||||
@@ -847,10 +847,10 @@
|
||||
GridColor="{Binding GridColor}"
|
||||
Background="{Binding PageBackground,Converter={StaticResource ColorBrushConverter}}"
|
||||
AllowDrop="{Binding AllowDrop}">
|
||||
<s:DesignerCanvas.LayoutTransform>
|
||||
<dd:DesignerCanvas.LayoutTransform>
|
||||
<ScaleTransform ScaleX="{Binding ZoomValue}" ScaleY="{Binding ZoomValue}" />
|
||||
</s:DesignerCanvas.LayoutTransform>
|
||||
</s:DesignerCanvas>
|
||||
</dd:DesignerCanvas.LayoutTransform>
|
||||
</dd:DesignerCanvas>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
|
||||
@@ -870,10 +870,10 @@
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl x:Name="diagram" ItemsSource="{Binding Items}"
|
||||
ItemContainerStyleSelector="{x:Static s:DesignerItemsControlItemStyleSelector.Instance}">
|
||||
ItemContainerStyleSelector="{x:Static dd:DesignerItemsControlItemStyleSelector.Instance}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<s:DesignerCanvas
|
||||
<dd:DesignerCanvas
|
||||
Height="{Binding PageSize.Height}"
|
||||
Width="{Binding PageSize.Width}"
|
||||
ShowGrid="{Binding ShowGrid}"
|
||||
@@ -882,16 +882,16 @@
|
||||
GridColor="{Binding GridColor}"
|
||||
Background="{Binding PageBackground,Converter={StaticResource ColorBrushConverter}}"
|
||||
AllowDrop="{Binding AllowDrop}">
|
||||
<s:DesignerCanvas.LayoutTransform>
|
||||
<dd:DesignerCanvas.LayoutTransform>
|
||||
<ScaleTransform ScaleX="{Binding ZoomValue}" ScaleY="{Binding ZoomValue}" />
|
||||
</s:DesignerCanvas.LayoutTransform>
|
||||
</s:DesignerCanvas>
|
||||
</dd:DesignerCanvas.LayoutTransform>
|
||||
</dd:DesignerCanvas>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
<s:ZoomBox x:Name="zoomBox"
|
||||
<dd:ZoomBox x:Name="zoomBox"
|
||||
Width="180"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
|
||||
Reference in New Issue
Block a user