mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-08 02:06:40 +08:00
FlowchartEditor完成
This commit is contained in:
69
AIStudio.Wpf.DiagramDesigner/Styles/DesignerItems.xaml
Normal file
69
AIStudio.Wpf.DiagramDesigner/Styles/DesignerItems.xaml
Normal file
@@ -0,0 +1,69 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:s="clr-namespace:AIStudio.Wpf.DiagramDesigner"
|
||||
xmlns:c="clr-namespace:AIStudio.Wpf.DiagramDesigner.Controls">
|
||||
|
||||
|
||||
<!-- Connector Style -->
|
||||
<Style TargetType="{x:Type s:Connector}">
|
||||
<Setter Property="Width"
|
||||
Value="8" />
|
||||
<Setter Property="Height"
|
||||
Value="8" />
|
||||
<Setter Property="Cursor"
|
||||
Value="Cross" />
|
||||
<Setter Property="SnapsToDevicePixels"
|
||||
Value="true" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type s:Connector}">
|
||||
<Grid>
|
||||
<!-- transparent extra space makes connector easier to hit -->
|
||||
<Rectangle Fill="Transparent"
|
||||
Margin="-2" />
|
||||
<Rectangle Fill="Lavender"
|
||||
StrokeThickness="1"
|
||||
Stroke="#AA000080" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ConnectorDecoratorTemplate Default Template -->
|
||||
<ControlTemplate x:Key="ConnectorDecoratorTemplate"
|
||||
TargetType="{x:Type Control}">
|
||||
<Grid Margin="-5">
|
||||
<s:Connector x:Name="Left"
|
||||
Orientation="Left"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left" />
|
||||
<s:Connector x:Name="Top"
|
||||
Orientation="Top"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Center" />
|
||||
<s:Connector x:Name="Right"
|
||||
Orientation="Right"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right" />
|
||||
<s:Connector x:Name="Bottom"
|
||||
Orientation="Bottom"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
|
||||
<!-- DragThumb Default Template -->
|
||||
<Style TargetType="{x:Type c:DragThumb}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type c:DragThumb}">
|
||||
<Rectangle Fill="Transparent" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user