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
I've run into a scenario where a Page with a PageViewContainer and a button that calls App.Current.MainPage = new NavigationPage(new MyPage()) does not work. The app appears to not change the MainPage.
However, MainPage is set, and if you minimize the application on iOS, then open it back up it will be correct.
Consider this page:
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:ttc="clr-namespace:TwinTechs.Controls;assembly=TwinTechsForms"
x:Class="CaseProjectTest.Views.MyPage"
Title="My Page">
<ContentPage.Content>
<StackLayout>
<ttc:PageViewContainer>
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand">
<ttc:PageViewContainer.Content>
<ContentPage>
<Label Text="Page in a Page"></Label>
</ContentPage>
</ttc:PageViewContainer.Content>
</ttc:PageViewContainer>
<Button Text="Click Me" Command="{Binding NavigateCommand}"/>
</StackLayout>
</ContentPage.Content>
</ContentPage>
The button command will cause App.Current.MainPage = new NavigationPage(new MyPageTwo()); to happen. MyPageTwo is just an empty ContentPage. When you press the button, MyPage is still showing. I would expect MyPageTwo to show (within the NavigationPage).
The text was updated successfully, but these errors were encountered:
I've run into a scenario where a Page with a PageViewContainer and a button that calls
App.Current.MainPage = new NavigationPage(new MyPage())
does not work. The app appears to not change the MainPage.However, MainPage is set, and if you minimize the application on iOS, then open it back up it will be correct.
Consider this page:
The button command will cause
App.Current.MainPage = new NavigationPage(new MyPageTwo());
to happen.MyPageTwo
is just an emptyContentPage
. When you press the button,MyPage
is still showing. I would expectMyPageTwo
to show (within the NavigationPage).The text was updated successfully, but these errors were encountered: