Xamarin Forms - Tabbed View?

前端 未结 2 1579
予麋鹿
予麋鹿 2021-01-21 00:27

I need to create a popup, in which there will be some tabs, each of them containing a listview. I know that there is a TabbedPage, but I need a \"TabbedView\" so I can build my

2条回答
  •  梦谈多话
    2021-01-21 00:49

    You can create a custom control yourself.

    (imagine you want to create 3 tabs)

    For example you can have a view that it's a grid with 2 rows and 3 columns.

    1st row you set the buttons set the RowHeight to auto or a size you want, and add each button to each column.

    On row 2 you can have a ContentView with RowHeight of * (to fill the rest of the space) , you should also set GridSpan to 3 columns so it will fill all width available on the grid.

    Then when you click a button you just have to set the ContentView view to what you want for that particular tab., you can also have animations before changing the content.

    Hope it helps

提交回复
热议问题