How to set the DefaultExtension? In the following code, the first entry is, so gif displayed. DefaultExtension but png. What should I change to make it work?
Code snippet:
var savePicker = new FileSavePicker
{
SuggestedStartLocation = PickerLocationId.PicturesLibrary,
CommitButtonText = "Save",
DefaultFileExtension = ".png",
SettingsIdentifier = "fsp1",
SuggestedFileName = "MyImage"
};
savePicker.FileTypeChoices.Add("Gif-Image", new List<string> { ".gif" });
savePicker.FileTypeChoices.Add("Jpeg-Image", new List<string> { ".jpg" });
savePicker.FileTypeChoices.Add("Png-Image", new List<string> { ".png" });
savePicker.FileTypeChoices.Add("Ico-File", new List<string> { ".ico" });
savePicker.FileTypeChoices.Add("Bmp-Image", new List<string> { ".bmp" });
StorageFile file = await savePicker.PickSaveFileAsync();