0% found this document useful (0 votes)
3 views

Mobile Programming

The document outlines the structure and implementation of a TabbedPage in mobile programming using Xamarin.Forms. It details how to create tabs with separate content pages, add icons to the tabs, and organize tab content into separate files. Additionally, it provides links for further information on XML namespaces and markup compatibility attributes.

Uploaded by

ahmed.s.g9800
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Mobile Programming

The document outlines the structure and implementation of a TabbedPage in mobile programming using Xamarin.Forms. It details how to create tabs with separate content pages, add icons to the tabs, and organize tab content into separate files. Additionally, it provides links for further information on XML namespaces and markup compatibility attributes.

Uploaded by

ahmed.s.g9800
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

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:

You might also like