123456789101112131415161718192021 |
- using Microsoft.Maui.ApplicationModel;
- using Microsoft.Maui.Storage;
- 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 IsEnabled<Permissions.Photos>();
- protected override async Task<FileResult> Capture()
- => await PlatformTools.ImageTools.PickPhotoAsync(Options.Compression, Options.Constraints);
-
- }
- }
|