I created user control of the RadWindow with custom content and controls. The issue I'm having is when I show the dialog it can't get a way to return what the button the user returns. What occurs is as soon as the dialog shows up it always returns the default button without waiting for the dialog to close.
button click event for buttons:
private void Clicked(object sender, ExecutedRoutedEventArgs e)
{
ButtonType dr = (ButtonType)Enum.Parse(typeof(ButtonType), e.Parameter.ToString());
this.DialogResponse = dr;
dialogWindow.Close();
}
common function on page:
public ButtonType ShowMessageDialog(string message, string caption, DialogButtonSet buttons, DialogIcon icon)
{
this.Style = null;
this.DialogText = message;
this.DialogButtonType = buttons;
this.HeaderImageIcon = icon;
this.DialogTitle = caption;
this.ButtonClickPreview = null;
this.MessageBox.Visibility = Visibility.Visible;
this.CustomContent.Visibility = Visibility.Collapsed;
this.Launched = true;
this.ClearPushdown();
this.ShowDialog(); <===== I want the code to stop here until window closes
return this.DialogResponse;
}
button click event for buttons:
private void Clicked(object sender, ExecutedRoutedEventArgs e)
{
ButtonType dr = (ButtonType)Enum.Parse(typeof(ButtonType), e.Parameter.ToString());
this.DialogResponse = dr;
dialogWindow.Close();
}
common function on page:
public ButtonType ShowMessageDialog(string message, string caption, DialogButtonSet buttons, DialogIcon icon)
{
this.Style = null;
this.DialogText = message;
this.DialogButtonType = buttons;
this.HeaderImageIcon = icon;
this.DialogTitle = caption;
this.ButtonClickPreview = null;
this.MessageBox.Visibility = Visibility.Visible;
this.CustomContent.Visibility = Visibility.Collapsed;
this.Launched = true;
this.ClearPushdown();
this.ShowDialog(); <===== I want the code to stop here until window closes
return this.DialogResponse;
}