notify application when a command is enabled or disabled

This commit is contained in:
Michael Becker 2021-02-23 23:40:48 -05:00
parent 489544e372
commit 32a9da8a02
No known key found for this signature in database
GPG Key ID: 98C333A81F18C22C

View File

@ -79,7 +79,8 @@ namespace MBS.Framework
/// that reference it. /// that reference it.
/// </summary> /// </summary>
/// <value><c>true</c> if visible; otherwise, <c>false</c>.</value> /// <value><c>true</c> if visible; otherwise, <c>false</c>.</value>
public bool Enabled { get; set; } = true; private bool _Enabled = true;
public bool Enabled { get { return _Enabled; } set { _Enabled = value; Application.Instance._EnableDisableCommand(this, value); } }
/// <summary> /// <summary>
/// Determines whether this <see cref="Command" /> is visible in all <see cref="CommandBar" />s and <see cref="MenuBar" />s /// Determines whether this <see cref="Command" /> is visible in all <see cref="CommandBar" />s and <see cref="MenuBar" />s