ImageEditor does not show image after binding

Good Day 

I have an Image Editor defined like this 

                 <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 

 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 

3 Replies 1 reply marked as answer

RS Ramya Soundar Rajan Syncfusion Team January 25, 2021 12:46 PM UTC

Hi Vuyiswa, 
 
We have tried to replicate the reported issue at our end, but we are not able to reproduce the issue at our end.   
 
So, could you please check the issue with the attached sample and let us know whether it is reproduced or not? If the issue was not reproduced, please revert us by modifying the sample based on your application along with replication procedure. This will be helpful for us to investigate further and provide you a better solution at the earliest. Please find the sample from the following location. 
 
 
Regards, 
Ramya S. 


Marked as answer

VU Vuyiswa January 28, 2021 10:36 PM UTC

Good Day Admin 

I found the issue. There were references that were missing on the Android Project. I realized that if the controls dont work with no error , it mostly means i missing the reference dll from on the platform project. 

The issue is resolved thanks 


SS Sridevi Sivakumar Syncfusion Team January 29, 2021 08:29 AM UTC

Hi Vuyiswa,

Thanks for your update.

Glad that the issue has been resolved and please get back to us if you need any other assistance.

Regards,
Sridevi S.  


Loader.
Up arrow icon