Change file extension when user changes Save As Type in SaveFileDialog

I have a SaveFileDialog with the option of saving with type .foo or .bar. The first item in the list, and selected by default, is .foo. The default filename is "untitled", and the default extension is ".foo". When the SaveFileDialog appears, it puts "untitled" in the file name textbox. I can change it to "untitled.foo" but it still doesn't change the behavior in regards to my problem:

If the user switches to .bar, how can I make the filename change to untitled.bar? There's only two events, neither of which is the one I want, and it doesn't seem to be changing itself.

8
задан Ed Marty 8 November 2010 в 23:19
поделиться