private void SecondaryButton_Click(object sender, RoutedEventArgs e) { SecondaryButtonCommand?.Execute(SecondaryButtonCommandParameter); SecondaryButtonClick?.DynamicInvoke(); Result = CustomContentDialogResult.Secondary; Hide(); }
private void SecondaryButtonRoutedExecuted(object sender, ExecutedRoutedEventArgs e) { LightContentDialogButtonClickEventArgs lightContentDialogButtonClickEventArgs = new LightContentDialogButtonClickEventArgs(); SecondaryButtonClick?.Invoke(this, lightContentDialogButtonClickEventArgs); if (!lightContentDialogButtonClickEventArgs.Cancel) { SecondaryButtonCommand?.Execute(SecondaryButtonCommandParameter); tcs.TrySetResult(LightContentDialogResult.Secondary); } }