mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
demo提交
This commit is contained in:
@@ -42,8 +42,13 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
base.Init();
|
||||
|
||||
SelectItemCommand = new SimpleCommand(ExecuteSelectItemCommand);
|
||||
EditCommand = new SimpleCommand(ExecuteEditCommand);
|
||||
SelectItemCommand = new SimpleCommand(Command_Enable, ExecuteSelectItemCommand);
|
||||
EditCommand = new SimpleCommand(Command_Enable, ExecuteEditCommand);
|
||||
}
|
||||
|
||||
protected override void LoadDesignerItemViewModel(IDiagramViewModel root, SelectableItemBase designerbase)
|
||||
{
|
||||
base.LoadDesignerItemViewModel(root, designerbase);
|
||||
}
|
||||
|
||||
public virtual bool InitData()
|
||||
@@ -62,7 +67,29 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
public ICommand EditCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isSelected;
|
||||
[Browsable(false)]
|
||||
public override bool IsSelected
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isSelected;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref _isSelected, value))
|
||||
{
|
||||
//如果没有文字,失去焦点自动清除
|
||||
if (_isSelected == false && string.IsNullOrEmpty(Text))
|
||||
{
|
||||
ShowText = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private string _text;
|
||||
[Browsable(true)]
|
||||
|
||||
Reference in New Issue
Block a user