예제 #1
0
        private async void uploadpic()
        {
            try
            {
                if (!CrossMedia.Current.IsPickPhotoSupported)
                {
                    await App.Current.MainPage.DisplayAlert("Photos Not Supported", ":( Permission not granted to photos.", "OK");

                    return;
                }
                var file = await Plugin.Media.CrossMedia.Current.PickPhotoAsync(new Plugin.Media.Abstractions.PickMediaOptions
                {
                    PhotoSize = Plugin.Media.Abstractions.PhotoSize.Medium,
                });


                if (file == null)
                {
                    return;
                }
                else
                {
                    Showcase.Add(new ShowcaseListModel
                    {
                        ShowcaseImages = file.Path,
                    });
                }
            }
            catch (Exception ex)
            {
            }
        }
예제 #2
0
 private void GetData()
 {
     Showcase.Add(new ShowcaseListModel
     {
         ShowcaseImages = "add_photo.png",
         FrameColor     = Color.LightGray
     });
 }