Why is DialogResult a nullable bool in WPF?
问题 Can anyone think of a good explanation for the fact that result of a dialog is a nullable bool in WPF? This has always baffled me. In WinForms it was an enum type and that made a lot more sense to me. 回答1: In my opinion this was done because in most cases you don't need the generalized specialized options like Retry or Ignore. If you need more than OK/Cancel, you are supposed to use some kind of task dialog, e.g. with written-out answers. That way, you're not limited to the few enum values