[C#/MAUI/.NET6] IFilePicker 인터페이스 : PickAsync 메소드 사용시 플랫폼별 사용자 정의 파일 형식 설정하기
C#/MAUI 2022. 6. 10. 23:33728x90
반응형
728x170
FilePickerFileType filePickerFileType = new FilePickerFileType
(
new Dictionary<DevicePlatform, IEnumerable<string>>
{
{ DevicePlatform.iOS , new[] { "public.my.comic.extension" } },
{ DevicePlatform.Android, new[] { "application/comics" } },
{ DevicePlatform.WinUI , new[] { ".cbr", ".cbz" } },
{ DevicePlatform.Tizen , new[] { "*/*" } },
{ DevicePlatform.macOS , new[] { "cbr", "cbz" } },
}
);
PickOptions options = new()
{
PickerTitle = "Please select a comic file",
FileTypes = filePickerFileType
};
FileResult result = await FilePicker.Default.PickAsync(options);
728x90
반응형
그리드형(광고전용)
댓글을 달아 주세요