/// <summary> /// Shared code to dispose of any internal resources. /// </summary> protected virtual void ReleaseResources() { if (ParentValidation != null) { // To avoid leaking memory, it's important to detach any event handlers in Dispose() ParentValidation.ValidationStatusChanged -= OnValidationStatusChanged; } ParentModal?.NotifyFocusableComponentRemoved(this); if (Theme != null) { Theme.Changed -= OnThemeChanged; } }
/// <inheritdoc/> protected override void OnInitialized() { base.OnInitialized(); ParentModal.NotifyCloseActivatorIdInitialized(ElementId); }
public Task Close(CloseReason closeReason) { ParentModal?.Hide(closeReason); return(Task.CompletedTask); }