I would like to let the user choose their options after a button is clicked. For example, showing two buttons, “Restart Now” and “Restart Later” in a modal popup window would be my preference. Using a MessageBox is not a solution for me as it does not allow the user to change the title of buttons.
I would like to let the user choose their options after a button is
Share
You need to create a new Window class. You can design that then any way you want. You can create and show a window modally like this:
You can add a custom property for your result value, or if you only have two possible results ( + possibly undeterminate, which would be
null), you can set the window’sDialogResultproperty before closing it and then check for it (it is the value returned byShowDialog()).