I work with Modern UI and try to make a dialog box that asks a question and then waits for an answer. I can do this with a message, but although I would try to use a modern interface. I am not sure how to get the value clicked on the button.
if (testapp.linkvalue != "NULL")
{
var v = new ModernDialog
{
Title = "my test",
Content = "pewpew lazers rule. If you agree click ok"
};
v.Buttons = new Button[] { v.OkButton, v.CancelButton };
var r = v.ShowDialog();
if (????????????????)
{
MessageBox.Show("ok was clicked");
}
else
{
MessageBox.Show("cancel was clicked");
}
}
source
share