|
| 1 | +<?xml version="1.0" encoding="utf-8" ?> |
| 2 | +<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
| 4 | + x:Class="TabviewSample.MainPage" |
| 5 | + xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core" |
| 6 | + xmlns:local="clr-namespace:TabviewSample" |
| 7 | + xmlns:tabView="clr-namespace:Syncfusion.Maui.TabView;assembly=Syncfusion.Maui.TabView"> |
| 8 | + |
| 9 | + |
| 10 | + <ContentPage.BindingContext> |
| 11 | + <local:TabItemsSourceViewModel /> |
| 12 | + </ContentPage.BindingContext> |
| 13 | + |
| 14 | + <ContentPage.Content> |
| 15 | + <tabView:SfTabView ItemsSource="{Binding TabItems}" TabWidthMode="Default" > |
| 16 | + <tabView:SfTabView.HeaderItemTemplate> |
| 17 | + <DataTemplate> |
| 18 | + <Grid > |
| 19 | + <Grid.ColumnDefinitions> |
| 20 | + <ColumnDefinition Width="2*"/> |
| 21 | + <ColumnDefinition Width="8*"/> |
| 22 | + </Grid.ColumnDefinitions> |
| 23 | + <core:SfBadgeView HorizontalOptions="Center" |
| 24 | + VerticalOptions="Center" |
| 25 | + BadgeText="20" |
| 26 | + Grid.Column="1" |
| 27 | + Margin="0,30,0,0" > |
| 28 | + <core:SfBadgeView.Content> |
| 29 | + <Label Text="{Binding ID}" |
| 30 | + WidthRequest="100" |
| 31 | + HeightRequest="60" |
| 32 | + Grid.Column="2" /> |
| 33 | + </core:SfBadgeView.Content> |
| 34 | + </core:SfBadgeView> |
| 35 | + </Grid> |
| 36 | + </DataTemplate> |
| 37 | + </tabView:SfTabView.HeaderItemTemplate> |
| 38 | + <tabView:SfTabView.ContentItemTemplate> |
| 39 | + <DataTemplate> |
| 40 | + <Grid BackgroundColor="White" x:Name="AllContactsGrid" > |
| 41 | + <ListView x:Name="ContactListView" |
| 42 | + ItemsSource="{Binding TabItems}" |
| 43 | + RowHeight="75"> |
| 44 | + <ListView.BindingContext> |
| 45 | + <local:TabItemsSourceViewModel /> |
| 46 | + </ListView.BindingContext> |
| 47 | + <ListView.ItemTemplate> |
| 48 | + <DataTemplate> |
| 49 | + <ViewCell> |
| 50 | + <StackLayout Orientation="Vertical" Margin="30,0,0,0"> |
| 51 | + <Label Text="{Binding ID}" |
| 52 | + FontSize="24" /> |
| 53 | + </StackLayout> |
| 54 | + </ViewCell> |
| 55 | + </DataTemplate> |
| 56 | + </ListView.ItemTemplate> |
| 57 | + </ListView> |
| 58 | + </Grid> |
| 59 | + </DataTemplate> |
| 60 | + </tabView:SfTabView.ContentItemTemplate> |
| 61 | + </tabView:SfTabView> |
| 62 | + </ContentPage.Content> |
| 63 | +</ContentPage> |
0 commit comments