void CommandManager_AfterExecute(object sender, CommandManagerExecuteEventArgs e)
        {
            if (Attached)
            {
                switch (e.CommandId)
                {
                    case CommandId.FindButton:
                        _findCommandExecuting = false;
                        break;
                    case CommandId.CheckSpelling:
                        _checkSpellingCommandExecuting = false;
                        break;
                    case CommandId.Undo:
                    case CommandId.Redo:
                        _undoRedoExecuting = false;
                        break;
                }

                if (Selected)
                    PersistSelectedEditField();
            }
        }
 void CommandManager_BeforeExecute(object sender, CommandManagerExecuteEventArgs e)
 {
     if (Attached)
     {
         switch (e.CommandId)
         {
             case CommandId.FindButton:
                 _findCommandExecuting = true;
                 break;
             case CommandId.CheckSpelling:
                 _checkSpellingCommandExecuting = true;
                 break;
             case CommandId.Undo:
             case CommandId.Redo:
                 _undoRedoExecuting = true;
                 break;
         }
     }
 }