PolygonRoiCanvas: ROI右键删除顶点阻止菜单弹出、IsEditable属性控制编辑状态

This commit is contained in:
李伟
2026-04-28 17:38:21 +08:00
parent 9d059709bd
commit 8b2cf01fe2
2 changed files with 40 additions and 2 deletions
@@ -21,6 +21,7 @@ namespace XP.ImageProcessing.RoiControl.Models
public abstract class ROIShape : INotifyPropertyChanged
{
private bool _isSelected;
private bool _isEditable = true;
private string _id = Guid.NewGuid().ToString();
private string _color = "Red";
@@ -36,6 +37,13 @@ namespace XP.ImageProcessing.RoiControl.Models
set { _isSelected = value; OnPropertyChanged(); }
}
/// <summary>是否可编辑(拖拽顶点、删除顶点)</summary>
public bool IsEditable
{
get => _isEditable;
set { _isEditable = value; OnPropertyChanged(); }
}
public string Color
{
get => _color;