Xamarin.Forms : Pages
Pages
A page occupies the full screen in most cases. A page acts the same as Page on a Windows Phone and UIViewController on iOS. It is important to note that on Android they are more like a Resource.Layout and are certainly not an Activity.
In Xamarin.Forms we have differents types of pages, the first:
ContengPage: It Contains a single view. This is created by default when you create a new project.
MasterDetailPage:
A page that has two panes for the page. Typically, the master will contain the likes of a menu with the detail the content.
NavigationPage:
A page that contains a navigation bar. Pages are kept on a stack and can be jumped between. The Navigation bar can handle buttons on either side of the bar as well as a title.
TabbedPage:
A container page. The TabbedPage acts as a container holding the content pages associated with each tab.
CarouselPage:
A page that allows for sweeping across to show other views.
More information in:
https://developer.xamarin.com/guides/cross-platform/xamarin-forms/controls/pages/
A page occupies the full screen in most cases. A page acts the same as Page on a Windows Phone and UIViewController on iOS. It is important to note that on Android they are more like a Resource.Layout and are certainly not an Activity.
In Xamarin.Forms we have differents types of pages, the first:
ContengPage: It Contains a single view. This is created by default when you create a new project.
using System;
using Xamarin.Forms;
namespace ContentPageOSE
{
public class App : Application
{
public App ()
{
// The root page of your application
MainPage = new ContentPage {
Content = new StackLayout {
VerticalOptions = LayoutOptions.Center,
Children = {
new Label {
XAlign = TextAlignment.Center,
Text = "Welcome to Xamarin Forms! \n This is a content Page."
}
}
}
};
}
protected override void OnStart ()
{
// Handle when your app starts
}
protected override void OnSleep ()
{
// Handle when your app sleeps
}
protected override void OnResume ()
{
// Handle when your app resumes
}
}
}
MasterDetailPage:
A page that has two panes for the page. Typically, the master will contain the likes of a menu with the detail the content.
NavigationPage:
A page that contains a navigation bar. Pages are kept on a stack and can be jumped between. The Navigation bar can handle buttons on either side of the bar as well as a title.
TabbedPage:
A container page. The TabbedPage acts as a container holding the content pages associated with each tab.
CarouselPage:
A page that allows for sweeping across to show other views.
More information in:
https://developer.xamarin.com/guides/cross-platform/xamarin-forms/controls/pages/
Comentarios
Publicar un comentario