Exemple #1
0
 private void SecondaryButton_Click(object sender, RoutedEventArgs e)
 {
     SecondaryButtonCommand?.Execute(SecondaryButtonCommandParameter);
     SecondaryButtonClick?.DynamicInvoke();
     Result = CustomContentDialogResult.Secondary;
     Hide();
 }
Exemple #2
0
        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);
            }
        }