Hello ,
I have this xaml code (main Page):
<?xml version="1.0" encoding="UTF-8"?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Test.Views.Food"
x:Class="Test.Views.Food.OrderFood"
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
android:TabbedPage.ToolbarPlacement="Bottom"
>
<local:Menu></local:Menu>
<local:OrderForm></local:OrderForm>
</TabbedPage>
and in the Menu Page there is also a tappebPage :
<?xml version="1.0" encoding="UTF-8"?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Test.Views.Food.Menu"
Title="Menu"
xmlns:local="clr-namespace:Test.Views.Food"
x:Name="_menu"
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
android:TabbedPage.ToolbarPlacement="Bottom">
<local:Page1></local:Page1>
<local:Page2></local:Page2>
</TabbedPage>
and in my page1 i have button(btn1), when i click it suppose to switch to OrderFrom
my code when i press on btn1:
private void Btn1Click(object sender, EventArgs e)
{
var masterPage = this.Parent as TabbedPage;
masterPage.CurrentPage = masterPage.Children[1];
}
this code work fine, but he switch between page 1 and page 2 , but my objective to switch to OrderForm.
thanks i advance.