Results 1 to 2 of 2

Thread: BookmarkImageEditor does not show image after binding

  1. #1

    Thread Starter
    Fanatic Member vuyiswamb's Avatar
    Join Date
    Jan 2007
    Location
    South Africa
    Posts
    826

    BookmarkImageEditor does not show image after binding

    Good Day

    I have an Image Editor defined like this

    Code:
         <imageeditor:SfImageEditor      IsVisible="True"       HeightRequest="525" x:Name="imageEditor">
                            <imageeditor:SfImageEditor.ToolbarSettings>
                                <imageeditor:ToolbarSettings  IsVisible="True" />
                            </imageeditor:SfImageEditor.ToolbarSettings>
                        </imageeditor:SfImageEditor>
    and i am binding it from the image that has been selected by the user from the phone gallery like this

    Code:
     private async void TapGestureRecognizer_Tapped(object sender, EventArgs e)
            {
                try
                {
                    if (!CrossMedia.Current.IsPickPhotoSupported)
                    {
                        await DisplayAlert("Error", ":( Permission not granted to photos.", "ok");
                        return;
                    }
                    var file = await CrossMedia.Current.PickPhotoAsync(new Plugin.Media.Abstractions.PickMediaOptions
                    {
                        PhotoSize = Plugin.Media.Abstractions.PhotoSize.Medium
                    });
    
                    if (file == null)
                        return;
    
                    filePath = file.Path;
                    paths.Enqueue(filePath);
                    //Linux path 
                    readytosave = StreamToByteArray(file.GetStream());
                    Uri uri = new Uri(file.Path);
                    filename = string.Empty;
                    if (uri.IsFile)
                    {
                        filename = System.IO.Path.GetFileName(uri.LocalPath);
                    }
                    var extension = filename.Split('.')[1].ToLower();
                    file_extension = extension;
    
                    m_retSource = ImageSource.FromStream(() => new MemoryStream(readytosave));
                    m_readytosave = readytosave; 
          
                    var imageEditor = (SfImageEditor)stackeditor.FindByName("imageEditor");//Parent control of image 
                  
                    if (imageEditorTelerik != null)
                    {  
                        imageEditor.Source= m_retSource;
                    }
              
                }
                catch (Exception ex)
                {
                    await DisplayAlert("Error", ex.Message, "ok");
                }
            }
    i was using Telerik ImageEditor , it works , but Sysfusion does not show the binded image on the control. Please note the platform is Android

    Thanks

  2. #2
    New Member
    Join Date
    Feb 2021
    Posts
    2

    Re: BookmarkImageEditor does not show image after binding

    I also have the same problems. Did you solve it?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width