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