public void OnNavigatedTo(NavigationContext navigationContext) { Title = navigationContext.Parameters[nameof(Title)] as string; Message = navigationContext.Parameters[nameof(Message)] as string; var modalIcon = (ModalIconEnum)navigationContext.Parameters[nameof(ModalIconEnum)]; HasCustomIcon = modalIcon != ModalIconEnum.None; if (HasCustomIcon) { IconPath = GetIconPath(modalIcon, "ico"); ImagePath = GetIconPath(modalIcon, "png"); } var modalButtons = (ModalButtonEnum[])navigationContext.Parameters[nameof(ModalButtonEnum)]; HasYesButton = modalButtons.Contains(ModalButtonEnum.Yes); HasNoButton = modalButtons.Contains(ModalButtonEnum.No); HasOkButton = modalButtons.Contains(ModalButtonEnum.Ok); HasCancelButton = modalButtons.Contains(ModalButtonEnum.Cancel); WindowPropertiesChanged?.Invoke(this); }
protected virtual void OnWindowPropertiesChanged() { WindowPropertiesChanged?.Invoke(this); }