mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-08 18:26:35 +08:00
可以自定义连接点
This commit is contained in:
@@ -9,10 +9,8 @@ using System.Windows.Media;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class Connector : Control
|
||||
public class Connector : ContentControl
|
||||
{
|
||||
|
||||
|
||||
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
|
||||
{
|
||||
base.OnMouseLeftButtonDown(e);
|
||||
@@ -34,6 +32,17 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
return element as DesignerCanvas;
|
||||
}
|
||||
|
||||
public FullyCreatedConnectorInfo Info
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Content is FullyCreatedConnectorInfo connectorInfo)
|
||||
return connectorInfo;
|
||||
|
||||
return this.DataContext as FullyCreatedConnectorInfo;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user