mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-04 08:06:36 +08:00
查找与替换完成
This commit is contained in:
@@ -315,7 +315,7 @@
|
||||
<Setter Property="ContentTemplate">
|
||||
<Setter.Value>
|
||||
<DataTemplate>
|
||||
<Grid x:Name="selectedGrid" IsHitTestVisible="{Binding IsHitTestVisible}" >
|
||||
<Grid x:Name="selectedGrid" IsHitTestVisible="{Binding IsHitTestVisible}" >
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu ItemsSource="{Binding MenuOptions}" Visibility="{Binding ShowMenuOptions,Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<ContextMenu.ItemContainerStyle>
|
||||
@@ -819,7 +819,7 @@
|
||||
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Border>
|
||||
<Grid>
|
||||
<Control x:Name="control">
|
||||
<Control.Style>
|
||||
<Style TargetType="Control">
|
||||
@@ -842,7 +842,7 @@
|
||||
AllowDrop="{Binding AllowDrop}">
|
||||
<dd:DesignerCanvas.LayoutTransform>
|
||||
<ScaleTransform ScaleX="{Binding ZoomValue}" ScaleY="{Binding ZoomValue}" />
|
||||
</dd:DesignerCanvas.LayoutTransform>
|
||||
</dd:DesignerCanvas.LayoutTransform>
|
||||
</dd:DesignerCanvas>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
@@ -903,5 +903,5 @@
|
||||
</Style>
|
||||
</Control.Style>
|
||||
</Control>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -27,6 +27,13 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
this.Resources.MergedDictionaries.Add(ResourceDictionary);
|
||||
}
|
||||
|
||||
this.IsVisibleChanged += DiagramControl_IsVisibleChanged;
|
||||
}
|
||||
|
||||
private void DiagramControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty ResourceDictionaryProperty = DependencyProperty.Register(nameof(ResourceDictionary), typeof(ResourceDictionary), typeof(DiagramControl), new UIPropertyMetadata(null, OnResourceDictionaryChanged));
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
<dd:ArrowPathConverter x:Key="ArrowPathConverter"/>
|
||||
<dd:ArrowSizeConverter x:Key="ArrowSizeConverter"/>
|
||||
<dd:MathConverter x:Key="MathAddConverter" Operation="Add" />
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
|
||||
<Style x:Key="LineStyle" TargetType="Path">
|
||||
<Setter Property="Stroke" Value="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"/>
|
||||
<Style.Triggers>
|
||||
@@ -88,6 +90,20 @@
|
||||
</Path>
|
||||
</Grid>
|
||||
|
||||
<Rectangle Canvas.Left="{Binding StartPoint.X}"
|
||||
Canvas.Top="{Binding StartPoint.Y}"
|
||||
Fill="DarkRed"
|
||||
Width="{Binding SourceConnectorInfo.ConnectorWidth}"
|
||||
Height="{Binding SourceConnectorInfo.ConnectorHeight}"
|
||||
Visibility="{Binding IsSelected,Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||
|
||||
<Ellipse Canvas.Left="{Binding EndPoint.X}"
|
||||
Canvas.Top="{Binding EndPoint.Y}"
|
||||
Fill="DarkRed"
|
||||
Width="{Binding SinkConnectorInfo.ConnectorWidth}"
|
||||
Height="{Binding SinkConnectorInfo.ConnectorHeight}"
|
||||
Visibility="{Binding IsSelected,Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||
|
||||
<Ellipse x:Name="ball" Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
Width="{Binding ColorViewModel.LineWidth,Converter={StaticResource MathAddConverter},ConverterParameter=4}"
|
||||
Height="{Binding ColorViewModel.LineWidth,Converter={StaticResource MathAddConverter},ConverterParameter=4}"
|
||||
|
||||
Reference in New Issue
Block a user