I'm trying to get the image editor to load an image, and it won't.
I've got a tabbed page. The last item in the tab should just load the imageeditor. I've got a simple picture that should load by default, and it doesn't. If I try to use use a camera and load, I don't get an image. I'm running in .NET 8 and the latest VS 2022. I've tried this on an android device (8.1). I've tried this in the emulator. Nothing seems to work. Any suggestions are appreciated.
TIA
Tabbed page;
public class TabbedNavPage : Microsoft.Maui.Controls.TabbedPage
{
public TabbedNavPage() {
On<Microsoft.Maui.Controls.PlatformConfiguration.Android>().SetToolbarPlacement(ToolbarPlacement.Bottom);
var ratePage = new NavigationPage(new MainPage()) {
Title = "Rate",
IconImageSource = "rate.png"
};
var login = new NavigationPage(new Login()) {
Title = "Login & Account",
IconImageSource = "account.png"
};
var imageList = new NavigationPage(new ImageList()) {
Title = "Image List",
IconImageSource = "list.png"
};
var imageObtain = new NavigationPage(new PicEdit());
Children.Add(ratePage);
Children.Add(login);
Children.Add(imageList);
Children.Add(imageObtain);
}
}
My PicEdit page.
<ContentPage.Content>
<VerticalStackLayout>
<imageEditor:SfImageEditor x:Name="imgEdit" Source="bed.png" />
</VerticalStackLayout>
</ContentPage.Content>
Hi Wally,
#Regarding Getting the ImageEditor to load an image
We could not replicate the reported scenario from our end. We have prepared the sample with the given information and checked the sample from our side. Please refer to the tested sample in the attachment.
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us with the following details,
.
Share the issue replicated videos and steps.
It will be helpful for us to check on it and provide you with a solution as soon as possible.
Regards,
SaiGanesh Sakthivel
The issue that I am finding is that the imageditor doesn't seem to load images properly unless it is in a grid. I had it in a vertical stack layout.
Hi
Wally,
#Regarding Image is not loaded inside the Vertical StackLayout
As per the current implementation, the minimum height of the image editor control is set to 100. Therefore, we recommend that you adjust the Height Request for the image editor based on your specific requirements. Please refer to the provided code snippet for your reference.
Code Snippet
|
<VerticalStackLayout > <imageEditor:SfImageEditor Source="imageeditordesktop.png" HeightRequest="400" /> </VerticalStackLayout> |
Please let us know if you have any concerns.
Regards,
SaiGanesh Sakthivel