I’m using WPF for creating my application, I am calling a windows form using formobject.Show()
from a xaml.cs file,
In the form I have Accept button and a cancel button . How to make the xaml.cs file know which button is clicked by the user in the form.? As the Execution(in ###.xaml.cs) depends on the button clicked.
I solved it, used the property
this.DialogResult = DialogResult.OK;in the the formand used
if (confirm.DialogResult.ToString() == "OK")in the cs file to check which button is clicked@Sebastian thanks for the idea.