9 [XamlCompilation(XamlCompilationOptions.Compile)]
12 private const uint durationInMs = 300;
19 this.InitializeComponent();
29 if (attachments is
null || attachments.Length <= 0)
32 Attachment[] imageAttachments = attachments.GetImageAttachments().ToArray();
33 if (imageAttachments.Length <= 0)
36 this.IsVisible =
true;
38 this.ViewModel<ImageViewModel>().LoadPhotos(attachments);
39 MainThread.BeginInvokeOnMainThread(async () =>
41 await this.PhotoViewer.FadeTo(1d, durationInMs, Easing.SinIn);
50 this.PhotoViewer.Opacity = 0;
51 this.ViewModel<ImageViewModel>().ClearPhotos();
52 this.IsVisible =
false;
55 private void CloseIcon_Tapped(
object Sender, EventArgs e)
66 return this.PhotoViewer.Opacity > 0 && this.IsVisible;
Contains a reference to an attachment assigned to a legal object.