Get used to it, because this is what you need. OpenFileDialog is not written in WPF, the dialog exists as unmanaged code inside Windows. The managed shell uses GetOpenFileName () for legacy versions; the IFileOpenDialog COM interface for current ones. For the latter, the IFileDialogCustomize interface was designed to customize the dialog.
These interfaces are easy to use from a C ++ program, the classic scourge of shell programming. The need to support XP computers is also a significant headache, and you really get hung up on the outdated dialog via GetOpenFileName (). This is what this code project does.
Hans passant
source share