/// <summary> /// Method to invoke when the ResolveLinkTo command is executed. /// </summary> private void ResolveLinkTo(LinkedToCheckBoxState state) { if (state.Value) { if (state.ParentId != Guid.Empty) { foreach (var markCollection in _markCollections) { if (markCollection.LinkedMarkCollectionId == state.ParentId) { markCollection.LinkedMarkCollectionId = Guid.Empty; } } } MarkCollection.LinkedMarkCollectionId = state.ParentId; foreach (var linkedToCheckBoxState in LinkedToCheckBoxStates.Where(x => x.ParentId != state.ParentId)) { linkedToCheckBoxState.Value = false; } } }
/// <summary> /// Method to check whether the ResolveLinkTo command can be executed. /// </summary> /// <returns><c>true</c> if the command can be executed; otherwise <c>false</c></returns> private bool CanResolveLinkTo(LinkedToCheckBoxState state) { return(true); }