OpenFileDialog's ShowDialog method returns a nullable boolean, set to true if the user clicked OK or false if he clicked Cancel. When does it return null
? The documentation does not say.
Wpf – When does Microsoft.Win32.OpenFileDialog.ShowDialog() return null
openfiledialogsavefiledialogwinapiwpf
Best Answer
This is stated in the questions linked below, but I'll mention here that Programming WPF (Chris Sells, Ian Griffiths) says:
Similar question: When would ShowDialog() return null?
And: Why is DialogResult a nullable bool in WPF?