So what I normally do to show a dialogue box and get a result in C# is,
MessageBoxResult result = MessageBox.Show("Wrong username or password", "Invalid details", MessageBoxButton.OK, MessageBoxImage.Hand);
string clear = "";
if (result == MessageBoxResult.OK)
{
username.Text = clear;
password.Password = clear;
}
However I've always hated this standard look it gives so I decided to make my own dialogue box in wpf. Problem is I'm not too sure exactly how to return a dialogue result with that. It's just a simple box with an okay button that's supposed to clear the username and password fields.
Is there any way to do this?