botton OS menu overlapping my page Xamarin.Forms - xamarin.forms

I have developed a tabbed page application with Xamarin.Forms. The OS navigation menu is overlapping my application. Can this menu be hidden?
Attach one screenshot:
My XAML are:
RootTabbedPage:
<?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="MyTimesheet.MainPage"
xmlns:behaviors="clr-namespace:MyTimesheet.Behaviors"
xmlns:ViewModels="clr-namespace:MyTimesheet.ViewModels"
xmlns:pages="clr-namespace:MyTimesheet.Pages"
behaviors:CurrentTabChangedBehavior.AttachBehavior="true"
>
<TabbedPage.BindingContext>
<ViewModels:MainViewModel></ViewModels:MainViewModel>
</TabbedPage.BindingContext>
<pages:ClientiPage Title="Clienti"/>
<pages:CommessePage Title="Commesse"/>
<pages:ConsuntivazioniPage Title="Consuntivazioni"/>
<!--Pages can be added as references or inline-->
</TabbedPage>
My Child page:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:ViewModels="clr-namespace:MyTimesheet.ViewModels"
xmlns:Converters="clr-namespace:MyTimesheet.Converters"
xmlns:Ext="clr-namespace:MyTimesheet.Extensions"
x:Class="MyTimesheet.Pages.ClientiPage">
<ContentPage.BindingContext>
<ViewModels:ClientiViewModel/>
</ContentPage.BindingContext>
<StackLayout >
...
assets\icons\24\24_addsquarebutton.png
...
</ContentPage>
I found an example to develop tabbed page on xamaring forum

Related

Xamarin Forms - Navigate to child of Tabbed Page

I have a TabbedPage with 3 tabs, where I want to navigate directly to the 2nd content page (TagsListPage), but still keep my Tabbed header.
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage
x:Class="BradyRfidDemo.V1.MobileApp.Views.TabbedInventoryPage"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:BradyRfidDemo.V1.MobileApp.Views"
Title=" SCAN PAGE"
Shell.NavBarIsVisible="false">
<local:InventoryPage />
<local:TagsListPage />
<local:Transfer />
</TabbedPage>
TagsListPage: (I removed most of the code to make it clean).
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="BradyRfidDemo.V1.MobileApp.Views.TagList"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
Title="TAGLIST"
BackgroundColor="{StaticResource Color1}">
<ContentPage.Content>
<StackLayout >
<Frame >
<StackLayout
HorizontalOptions="Center"
Orientation="Horizontal"
VerticalOptions="Center">
<Label
x:Name="TagList"
Margin="0,10,0,0"
HorizontalTextAlignment="Center"
Text="TAGLIST" />
</StackLayout>
</Frame>
</StackLayout>
</ContentPage.Content>
</ContentPage>
So I want to access from another form content page, directly the TagsListPage, and keep my tabbed header.
If I go to the main page, I get my tabbed header, but it goes to the first page (InventoryPage)
Navigation.PushAsync(new TabbedInventoryPage());
If I go directly to the TagListPage, then I get my page, but not the tabbed structure which I need as well.
Navigation.PushAsync(new TagsListPage());
I tried a lot of different things, but nothing worked so far, and this looks like a very simple thing to do. Any help is greatly appreciated.

My toolbar buttons are disappearing after two entries

I have successfully created my app and am finally ready to start testing before continuing with designs, however, while testing I find that after using my toolbar buttons twice it just disappears for no reason.
Here is the Xaml code for the item:
<?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:pages="clr-namespace:ODDJOBS.Views"
x:Class="ODDJOBS.Views.TabbedAppPage">
<TabbedPage.ToolbarItems>
<ToolbarItem Text="ODDJOBS" Priority="1"></ToolbarItem>
<ToolbarItem Text="+" Priority="2" Command="{Binding NavigateToAddPageCommand}">
</ToolbarItem>
</TabbedPage.ToolbarItems>
<!--Pages can be added as references or inline-->
<pages:NextPage Title="Jobs"/>
<pages:ServiceView Title="Services"/>
</TabbedPage>

Xamarin.Forms; Getting a tabbed page to be inside a MasterDetail Page

I have a master detail page with a burger icon at the top that shows the drawer menu. But the master detail itself is only one page, id like it to be 2 pages ( like in the tabbed page, where u can swipe between the two).
I have tried the following:
<MasterDetailPage.Detail>
<TabbedPage>
<TabbedPage.Children>
<ContentPage Title="Page 1" Icon="ja.png" />
<ContentPage Title="Page 2" Icon="ja.png" />
<ContentPage Title="Page 3" Icon="ja.png" />
</TabbedPage.Children>
</TabbedPage>
</MasterDetailPage.Detail>
This does display mulitple pages inside the master detail, but it also removes the burger and the whole navigation bar also.
Is there a way to enable a tabbed page inside a master detail and still have the navigation bar with the burger icon?
Thank you!
I only works when you have another page that is a tabbed page and render it here:
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="Q2go.View.MasterDetailPage1"
xmlns:pages="clr-namespace:Q2go.View">
<MasterDetailPage.Master>
<pages:MasterDetailPage1Master x:Name="MasterPage" />
</MasterDetailPage.Master>
<MasterDetailPage.Detail>
<NavigationPage>
<x:Arguments>
<pages:TabbedPage1/>
</x:Arguments>
</NavigationPage>
</MasterDetailPage.Detail>
</MasterDetailPage>
Try wrapping your TabbedPage in a NavigationPage as such:
<MasterDetailPage.Detail>
<NavigationPage>
<x:Arguments>
<TabbedPage>
<TabbedPage.Children>
<ContentPage Title="Page 1" Icon="ja.png" />
<ContentPage Title="Page 2" Icon="ja.png" />
<ContentPage Title="Page 3" Icon="ja.png" />
</TabbedPage.Children>
</TabbedPage>
</x:Arguments>
</NavigationPage>
</MasterDetailPage.Detail>

Make TabbedPage On MasterdetailPage Xamarin Forms

I have a problem making a tabbed layout on my master detail page. I have tried to do it like this:
<?xml version="1.0" encoding="utf-8" ?>
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MasterDetailTest.View"
x:Class="MasterDetailTest.MainPage">
<MasterDetailPage.Master>
<local:MasterPage x:Name="masterPage" />
</MasterDetailPage.Master>
<MasterDetailPage.Detail>
<NavigationPage>
<x:Arguments>
<local:Home />
</x:Arguments>
</NavigationPage>
<TabbedPage>
<TabbedPage.Children>
<ContentPage Title="Home" Icon="home.png"/>
<ContentPage Title="Home" Icon="home.png"/>
<ContentPage Title="Home" Icon="home.png"/>
</TabbedPage.Children>
</TabbedPage>
</MasterDetailPage.Detail>
</MasterDetailPage>
But for some reason it's not working adding tabbed page just on xaml, should i've to try this at the cs?
you can't put TabbedPage inside NavigationPage. The right order is:
- TabbedPage > NavigationPage > page.
In Fact, you shouldn't mix it. Use MasterDetailPage > NavigationPage
OR TabbedPage > NavigationPage BUT NOT MasterDetailPage > TabbedPage.
this would works for you:
MasterDetail:
https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/navigation/master-detail-page/
TabbedPage:
https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/navigation/tabbed-page/

xamarin.forms winphone tabbedpage with multiple navigationpage Title

Hi I have just started using xamarin to try and develop a cross platform application but I have hit a problem very early on with my winphone project.
I have a tabbedpage which contains 2 navigationpages. Both these navigationpages have identical content the only thing that differs is the Title of each. The problem comes when swiping between the tabbed pages. When first loaded it renders correctly but once I have gone around the tabbed once I seem to lose a Title and the other 1 jumps to the top of the page which I don't want. The location tabbedpage renders fine.
MainPage.xaml
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:iLarm;assembly=iLarm"
x:Class="iLarm.MainPage">
<NavigationPage Title="Alarm">
<x:Arguments>
<local:AlarmListPage />
</x:Arguments>
</NavigationPage>
<NavigationPage Title="Location" >
<x:Arguments>
<local:LocationListPage />
</x:Arguments>
</NavigationPage>
</TabbedPage>
AlarmListPage.xaml
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="iLarm.AlarmListPage"
Title="iLarm">
</ContentPage>
locationListPage.xaml
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="iLarm.LocationListPage"
Title="iLarm">
</ContentPage>
According to your codes, I wrote a demo. But the title of ContentPage didn't show at all.
From your screenshot I suppose you want to add title to top of the TabbedPage. According to this requirement you just need to set Title of TabbedPage likes below.
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:iLarm;assembly=iLarm"
x:Class="iLarm.MainPage"
Title="iLarm">
<NavigationPage Title="Alarm">
<x:Arguments>
<local:AlarmListPage />
</x:Arguments>
</NavigationPage>
<NavigationPage Title="Location">
<x:Arguments>
<local:LocationListPage />
</x:Arguments>
</NavigationPage>
</TabbedPage>

Resources