forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Description
Changing Content property of ShellContent does not change visual content. You need to reroute to the page in another tab and when you come back it changes, but only on windows and android. On Mac and iOS it doesn't change anyway.
Steps to Reproduce
1.Create Page inside ShellContent
2.try change Content property
3.it doesn't change visual content
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
private void OnCounterClicked(object sender, EventArgs e)
{
if (this.Parent is ShellContent shellContent)
{
var contentPage = new ContentPage();
var label = new Label();
label.Text = "Page changed";
label.FontSize = 30;
label.HorizontalOptions = LayoutOptions.Center;
label.VerticalOptions = LayoutOptions.Center;
contentPage.Content = label;
shellContent.ContentTemplate = null;
shellContent.Content = contentPage;
// there is no way to reload shell content
}
}
}
Link to public reproduction project repository
https://github.com/idexus/issue_maui_Content
Version with bug
10.0.0-preview.5
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows, macOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels