Hello. Just on DialogResult, I'm not wrong! I use System.Windows.Forms.FolderBrowserDialog instance in my WPF MVVM application. Please see the following code from the View Model:
Where IsTurnOffExportToExcelSelected is:
and IsTurnOnExportToExcelSelected is:
Each one of these properties is binding source fore menu item in the View:
here the source code of TurnOnExportToExcelCommand. It turns on export to CSV-file of the values of real-time chart data-points:
The condition of if-statement above is satisfied if DialogResult is DialogResult.OK. I verify it to set breakpoint in debugger. But if I click 'Cancel' button in the dialog then the debugger doesn't not show next steps but IsChecked property of IsTurnOnExportToExcelSelected menu item is set to true (the status of IsChecked property of TurnOffExportToMSExcel menu item is not changed). Why is TurnOnExportToMSExcel boolean property set to true if DialogResult is Cancel?