using GalaSoft.MvvmLight; using Muchinfo.MTPClient.Data.Enums; using System.Collections.Generic; using System.Windows; namespace Muchinfo.MTPClient.Data { /// /// SysContextMenuItem类 /// public class SysContextMenuItem : ViewModelBase { /// /// Initializes a new instance of the class. /// /// The title. /// The type. public SysContextMenuItem(string title, ContextMenuCommandType type) { this.Title = title; this.CommandType = type; _isEnable = true; } /// /// 获取和设置the title /// public string Title { get; set; } private bool _isEnable; /// /// 菜单 是否可用 /// public bool IsEnable { get { return _isEnable; } set { Set(() => IsEnable, ref _isEnable, value); } } private Visibility _isVisiable; /// /// 菜单 是否可用 /// public Visibility IsVisiable { get { return _isVisiable; } set { Set(() => IsVisiable, ref _isVisiable, value); } } /// /// Gets or sets the type of the command. /// public ContextMenuCommandType CommandType { get; set; } /// /// 子菜单 /// public List Children { get; set; } } }