mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
彩色连接点完成
This commit is contained in:
@@ -146,7 +146,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
private bool _isSelected;
|
||||
[Browsable(false)]
|
||||
public virtual bool IsSelected
|
||||
public bool IsSelected
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -154,7 +154,14 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
set
|
||||
{
|
||||
SetProperty(ref _isSelected, value);
|
||||
if (SetProperty(ref _isSelected, value))
|
||||
{
|
||||
//如果没有文字,失去焦点自动清除
|
||||
if (_isSelected == false && string.IsNullOrEmpty(Text))
|
||||
{
|
||||
ClearText();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,6 +305,16 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
|
||||
|
||||
protected virtual void ClearText()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void ClearSelected()
|
||||
{
|
||||
_isSelected = false;
|
||||
}
|
||||
|
||||
public virtual void AddToSelection(bool selected)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user