Forum Xamarin.Forms

ImageEditor does not show image after binding

VuyiswaMasekoVuyiswaMaseko USMember ✭✭✭

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>

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

Sign In or Register to comment.