LoginSignup
1
0

More than 5 years have passed since last update.

Xamarin.Forms(Prism)でTabbedPage

Posted at

MainPageがタブ画面のホストだとした場合、MainPageで↓のようにタブに表示する各ViewをImportするだけでOK。

MainPage.xaml
<?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:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
            xmlns:Views="clr-namespace:XF_TabApp.Views"
            prism:ViewModelLocator.AutowireViewModel="True"
            x:Class="XF_TabApp.Views.MainPage"
            Title="MainPage">
    <Views:HomePage />
    <Views:AboutPage />
</TabbedPage>

HomePage,AboutPageに自分がタブの一部ということを意識させることは一切ない。
Androidのタブより簡単かも。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0