I have a question about MAUI. I want to ask you. Thank you. This is my rendering. This is the effect on the Android simulator enter image description here
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiBlazorDemoApp.Views.MenuDetailPage"
xmlns:model="clr-namespace:MauiBlazorDemoApp.Models"
ItemsSource="{x:Static model:MenuClass.MenuClasses}"
xmlns:android="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific;assembly=Microsoft.Maui.Controls"
android:TabbedPage.OffscreenPageLimit="2"
android:TabbedPage.IsSmoothScrollEnabled="True"
android:TabbedPage.IsSwipePagingEnabled="true"
android:TabbedPage.ToolbarPlacement="Top"
FlowDirection="LeftToRight"
Title="MenuDetailPage">
<TabbedPage.ItemTemplate>
<DataTemplate>
<ContentPage Title="{Binding Name}" WidthRequest="1300"
>
<StackLayout Padding="5, 25">
<Label Text="{Binding Name}"
FontAttributes="Bold"
FontSize="18"
HorizontalOptions="Center" />
<StackLayout Padding="50, 10">
<StackLayout Orientation="Horizontal">
<Label Text="Family: "
FontAttributes="Bold" />
<Label Text="{Binding Sort}" />
</StackLayout>
</StackLayout>
</StackLayout>
</ContentPage>
</DataTemplate>
</TabbedPage.ItemTemplate>
</TabbedPage>
I want to know two things:
- How to make it scroll
- However, the title of each item can adapt to the width.
How can I make it scroll?