private static void OnDeclineTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
// Get ActionDialog instance
var dlg = (ActionDialog)d;
// If "Don't remind me again" box is checked, update the button text.
if (dlg.ChkDontRemind.IsChecked == true)
{
dlg.SecondaryButtonText = (string)e.NewValue;
}
}