mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 08:10:50 +08:00
可以自定义连接点
This commit is contained in:
@@ -43,6 +43,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
ConnectorHeight = 30;
|
||||
|
||||
DeleteLabelCommand = new SimpleCommand(Command_Enable, DeleteLabel);
|
||||
EditCommand = new SimpleCommand(Command_Enable, ExecuteEditCommand);
|
||||
}
|
||||
|
||||
protected override void LoadDesignerItemViewModel(SelectableItemBase designerbase)
|
||||
@@ -81,7 +82,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
get; set;
|
||||
}
|
||||
|
||||
//private bool _isSelected;
|
||||
private bool _isSelected;
|
||||
public override bool IsSelected
|
||||
{
|
||||
get
|
||||
@@ -106,6 +107,11 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public SimpleCommand EditCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
#endregion
|
||||
|
||||
private bool updating = false;
|
||||
@@ -198,5 +204,11 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void ExecuteEditCommand(object param)
|
||||
{
|
||||
if (IsReadOnly == true) return;
|
||||
|
||||
RaisePropertyChanged("ShowText");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user