COME319 Mobile Programing
Prepared By: Dr. Ihab ELAFF
• Type of page that has a list of Tabs and
content area.
• TabbedBar is used to hold icon and title
for each tab
• Content area for each tabbed page is
defined separately
• Only one tab content page would be
visible.
• Change ContenPage to TabbedPage
• Save files for updating the solution
< TabbedPage ……>
<ContentPage Title="Page 1">
<Label Text="This is Page 1" />
</ContentPage>
<ContentPage Title="Page 2">
<Label Text="This is Page 2" />
</ContentPage>
</TabbedPage>
< TabbedPage ……>
<ContentPage Title="Page 1">
<ContentPage.Content>
<StackLayout>
<Label Text="This is Page 1" />
</StackLayout>
</ContentPage.Content>
</ContentPage>
<ContentPage Title="Page 2">
<ContentPage.Content>
<StackLayout>
<Label Text="This is Page 2" />
</StackLayout>
</ContentPage.Content>
</ContentPage>
</TabbedPage>
Adding Icons to tabs:
• Download or design the icons (Google material
icons: http://material.io/resources/icons/)
Adding Icons to tabs:
• For iOS: Copy icons by Drag and Drop in the
“Resource” folder
• For Android: Copy icons by Drag and Drop in
“Resources drawable” folder.
To put each tab contents in a separate files:
• Add the local space definition:
xmlns:local="clr-namespace:Tabbed_Example“
• The xmlns attribute specifies the xml
namespace for a document.
• More details about XAML Namespaces in
Xamarin.Forms and “local” prefix :
https://docs.microsoft.com/en-
us/xamarin/xamarin-forms/xaml/namespaces
• More details about Markup Compatibility
Ignorable Attribute (mc:Ignorable):
https://docs.microsoft.com/en-
us/dotnet/desktop/wpf/advanced/mc-
ignorable-
attribute?view=netframeworkdesktop-4.8
To put each tab contents in a separate file:
• On the shared project title add new item
To put each tab contents in a separate file:
To put each tab contents in a separate file:
To put each tab contents in a separate file: