/// <summary>
 /// Called on cancel action.
 /// </summary>
 /// <param name="o">The o.</param>
 private void OnCancel(object o)
 {
     NewSubtopicTitle = string.Empty;
     ClearErrors(() => NewSubtopicTitle);
     Reset(false);
     AddSubtopicCommand.RaiseCanExecuteChanged();
 }
        /// <summary>
        /// Validates the new subtopic title.
        /// </summary>
        private void ValidateNewSubtopicTitle()
        {
            var prop = ExtractPropertyName(() => NewSubtopicTitle);

            ClearErrors(prop);

            if (string.IsNullOrWhiteSpace(NewSubtopicTitle))
            {
                SetError(prop, "Subtopic name cannot be empty.");
            }

            AddSubtopicCommand.RaiseCanExecuteChanged();
        }
 /// <summary>
 /// Called when [enable add subtopic].
 /// </summary>
 private void OnEnableAddSubtopic()
 {
     Reset(false);
     AddSubtopicCommand.RaiseCanExecuteChanged();
 }