| 12345678910111213141516171819202122 |
- using Avalonia.Controls;
- 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<ImageFile> Capture(TopLevel window)
- => await PlatformTools.ImageTools.PickPhotoAsync(window, Options.Compression, Options.Constraints);
-
- }
- }
|