namespace GDNXFD.Alert.Config.Controls { using System.Windows.Controls; /// /// Interaction logic for CustomDialog.xaml /// public partial class CustomDialog : UserControl { /// /// Constructor /// public CustomDialog() { InitializeComponent(); } private void CancelButton_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if ((bool)e.NewValue) this.CancelButton.Focus(); } } }