| 1234567891011121314151617181920 |
- using Avalonia.Controls;
- using InABox.Avalonia.Platform;
- namespace InABox.Avalonia
- {
- public class MobileDocumentPhotoLibrarySource : MobileImageSource<MobileDocumentPhotoLibrarySource, MobileDocumentPhotoLibraryOptions>
- {
-
- public MobileDocumentPhotoLibrarySource(MobileDocumentPhotoLibraryOptions options) : base(options)
- {
- }
-
- protected override async Task<bool> IsEnabled()
- => await PlatformTools.Permissions.IsPermitted(Permission.VideoLibrary);
- protected override async Task<ImageFile?> Capture(TopLevel window)
- => await PlatformTools.ImageTools.PickPhotoAsync(window, Options.Compression, Options.Constraints);
-
- }
- }
|