I would like to let the user choose a save option while selecting a file type. The selection works fine as in the below example. However after the user has selected a file type to be saved, I have not found a possibility to check which type he has selected.
Please note: Both file type choices have the same extension. The difference between the two is the display name.
var fsp = new FileSavePicker();
fsp.FileTypeChoices.Add("my file type", new List<string> {".extension"});
fsp.FileTypeChoices.Add("my file type (special)",new List<string>{".extension"});
StorageFile sf = await fsp.PickSaveFileAsync();
// How to know here which FileTypeChoice the user has selected
Has anyone an idea how I can get the selected FileTypeChoice?
I don't think you can. The problem here is that the only difference between the two is the display name. I'd highly recommend using similar but distinct file extensions. What you have here is a distinction without any evidence. This makes it impossible for either the system or the user to distinguish between Type A and Type B.