You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let me start by saying that I assume that this is me.
I have a .net 8 maui project. I have a tabbed page and navigation page setup for each of my tabs. Inside of my imagelist page, I have two toolbar items as shown below. the toolbar items open the camera or the photo library on the device. When I run the code to open the next page, I don't see the next page beyond the title of the page changing. That is not the behavior I would expect. This is behavior I am seeing in the android emulator on Win11. How do I get the next screen to show up? I've tried several things but no luck. I've googled with no luck. any ideas are appreciated. I've made the picedit page just a label with text and no luck there either.
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 img = new NavigationPage(new PicEdit());
Children.Add(ratePage);
Children.Add(login);
Children.Add(imageList);
Children.Add(img);
}
}
Toolbar items:
<ContentPage.ToolbarItems>
<ToolbarItemText="Add from camera"x:Name="CameraAdd"IconImageSource="camera.png"Clicked="CameraAdd_Clicked"/>
<ToolbarItemText="Add from photo library"x:Name="PhotoLibraryAdd"IconImageSource="imagelist.png"Clicked="PhotoLibraryAdd_Clicked"/>
</ContentPage.ToolbarItems>
code to open the camera:
private async void CameraAdd_Clicked(object sender, EventArgs e) {
await GetImageEditorCameraSourceAsync();
}
private async Task GetImageEditorCameraSourceAsync() {
var status = await Permissions.CheckStatusAsync<Permissions.Camera>();
if (status != PermissionStatus.Granted) {
// If the camera permission is not granted, request it.
status = await Permissions.RequestAsync<Permissions.Camera>();
if (status != PermissionStatus.Granted) {
// If the camera permission is denied by the user,
// You may show an alert or take appropriate action
return;
}
}
var photo = await MediaPicker.Default.CapturePhotoAsync();
if (photo != null) {
var img = ImageSource.FromStream(() => photo.OpenReadAsync().Result);
await Navigation.PushAsync(new PicEdit() { ImageSource = img });
}
}
The PicEdit page has gone thru various iterations of making this work. Here is what my most recent version is:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Let me start by saying that I assume that this is me.
I have a .net 8 maui project. I have a tabbed page and navigation page setup for each of my tabs. Inside of my imagelist page, I have two toolbar items as shown below. the toolbar items open the camera or the photo library on the device. When I run the code to open the next page, I don't see the next page beyond the title of the page changing. That is not the behavior I would expect. This is behavior I am seeing in the android emulator on Win11. How do I get the next screen to show up? I've tried several things but no luck. I've googled with no luck. any ideas are appreciated. I've made the picedit page just a label with text and no luck there either.
TIA
Tabbed Page:
Toolbar items:
code to open the camera:
The PicEdit page has gone thru various iterations of making this work. Here is what my most recent version is:
Beta Was this translation helpful? Give feedback.
All reactions