|
| 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="TabView.MainPage" |
| 5 | + xmlns:local="clr-namespace:TabView" |
| 6 | + xmlns:tabView="clr-namespace:Syncfusion.Maui.TabView;assembly=Syncfusion.Maui.TabView"> |
| 7 | + |
| 8 | + <ContentPage.Resources> |
| 9 | + <Style TargetType="tabView:SfTabItem"> |
| 10 | + <Setter Property="VisualStateManager.VisualStateGroups"> |
| 11 | + <VisualStateGroupList> |
| 12 | + <VisualStateGroup> |
| 13 | + <VisualState x:Name="Normal" > |
| 14 | + <VisualState.Setters> |
| 15 | + <Setter Property="TextColor" Value="Brown" /> |
| 16 | + </VisualState.Setters> |
| 17 | + </VisualState> |
| 18 | + <VisualState x:Name="Selected"> |
| 19 | + <VisualState.Setters> |
| 20 | + <Setter Property="TextColor" Value="Green" /> |
| 21 | + </VisualState.Setters> |
| 22 | + </VisualState> |
| 23 | + </VisualStateGroup> |
| 24 | + </VisualStateGroupList> |
| 25 | + </Setter> |
| 26 | + </Style> |
| 27 | + </ContentPage.Resources> |
| 28 | + |
| 29 | + <tabView:SfTabView x:Name="tabView" |
| 30 | + TabBarBackground="HotPink"> |
| 31 | + <tabView:SfTabView.Items> |
| 32 | + <tabView:SfTabItem Header="Call" x:Name="callItem" |
| 33 | + ImagePosition="Left"> |
| 34 | + <tabView:SfTabItem.ImageSource> |
| 35 | + <FontImageSource Glyph="ﺶ" x:Name="call" |
| 36 | + Color="{Binding Source={x:Reference callItem},Path=TextColor}" |
| 37 | + FontFamily="MaterialDesignIcons"/> |
| 38 | + </tabView:SfTabItem.ImageSource> |
| 39 | + <tabView:SfTabItem.Content> |
| 40 | + <ListView RowHeight="50"> |
| 41 | + <ListView.ItemsSource> |
| 42 | + <x:Array Type="{x:Type x:String}"> |
| 43 | + <x:String>James</x:String> |
| 44 | + <x:String>Richard</x:String> |
| 45 | + <x:String>Michael</x:String> |
| 46 | + <x:String>Alex</x:String> |
| 47 | + <x:String>Clara</x:String> |
| 48 | + </x:Array> |
| 49 | + </ListView.ItemsSource> |
| 50 | + <ListView.ItemTemplate> |
| 51 | + <DataTemplate> |
| 52 | + <ViewCell> |
| 53 | + <Grid Margin="10,5"> |
| 54 | + <Label VerticalOptions="Start" |
| 55 | + HorizontalOptions="Start" |
| 56 | + TextColor="#666666" |
| 57 | + FontSize="16" |
| 58 | + Text="{Binding}" /> |
| 59 | + </Grid> |
| 60 | + </ViewCell> |
| 61 | + </DataTemplate> |
| 62 | + </ListView.ItemTemplate> |
| 63 | + </ListView> |
| 64 | + </tabView:SfTabItem.Content> |
| 65 | + </tabView:SfTabItem> |
| 66 | + |
| 67 | + <tabView:SfTabItem Header="Favourite" x:Name="favItem" |
| 68 | + ImagePosition="Left"> |
| 69 | + <tabView:SfTabItem.ImageSource> |
| 70 | + <FontImageSource Glyph="" x:Name="fav" |
| 71 | + Color="{Binding Source={x:Reference favItem},Path=TextColor}" |
| 72 | + FontFamily="MaterialDesignIcons"/> |
| 73 | + </tabView:SfTabItem.ImageSource> |
| 74 | + <tabView:SfTabItem.Content> |
| 75 | + <ScrollView > |
| 76 | + <StackLayout Spacing="20" > |
| 77 | + <ListView RowHeight="50"> |
| 78 | + <ListView.ItemsSource> |
| 79 | + <x:Array Type="{x:Type x:String}"> |
| 80 | + <x:String>Steve</x:String> |
| 81 | + <x:String>Mark</x:String> |
| 82 | + <x:String>Alan</x:String> |
| 83 | + <x:String>Sandra</x:String> |
| 84 | + <x:String>Ryan</x:String> |
| 85 | + </x:Array> |
| 86 | + </ListView.ItemsSource> |
| 87 | + <ListView.ItemTemplate> |
| 88 | + <DataTemplate> |
| 89 | + <ViewCell> |
| 90 | + <Grid Margin="10,5"> |
| 91 | + <Label VerticalOptions="Start" |
| 92 | + HorizontalOptions="Start" |
| 93 | + TextColor="#666666" |
| 94 | + FontSize="16" |
| 95 | + Text="{Binding}" /> |
| 96 | + </Grid> |
| 97 | + </ViewCell> |
| 98 | + </DataTemplate> |
| 99 | + </ListView.ItemTemplate> |
| 100 | + </ListView> |
| 101 | + |
| 102 | + </StackLayout> |
| 103 | + </ScrollView> |
| 104 | + </tabView:SfTabItem.Content> |
| 105 | + </tabView:SfTabItem> |
| 106 | + |
| 107 | + <tabView:SfTabItem Header="Contacts" x:Name="contactsItem" |
| 108 | + ImagePosition="Left"> |
| 109 | + <tabView:SfTabItem.ImageSource> |
| 110 | + <FontImageSource Glyph="" x:Name="contacts" |
| 111 | + Color="{Binding Source={x:Reference contactsItem},Path=TextColor}" |
| 112 | + FontFamily="MaterialDesignIcons"/> |
| 113 | + </tabView:SfTabItem.ImageSource> |
| 114 | + <tabView:SfTabItem.Content> |
| 115 | + <ListView RowHeight="50"> |
| 116 | + <ListView.ItemsSource> |
| 117 | + <x:Array Type="{x:Type x:String}"> |
| 118 | + <x:String>Sandra</x:String> |
| 119 | + <x:String>Ryan</x:String> |
| 120 | + <x:String>Michael</x:String> |
| 121 | + <x:String>Mark</x:String> |
| 122 | + <x:String>Clara</x:String> |
| 123 | + </x:Array> |
| 124 | + </ListView.ItemsSource> |
| 125 | + <ListView.ItemTemplate> |
| 126 | + <DataTemplate> |
| 127 | + <ViewCell> |
| 128 | + <Grid Margin="10,5"> |
| 129 | + <Label VerticalOptions="Start" |
| 130 | + HorizontalOptions="Start" |
| 131 | + TextColor="#666666" |
| 132 | + FontSize="16" |
| 133 | + Text="{Binding}" /> |
| 134 | + </Grid> |
| 135 | + </ViewCell> |
| 136 | + </DataTemplate> |
| 137 | + </ListView.ItemTemplate> |
| 138 | + </ListView> |
| 139 | + </tabView:SfTabItem.Content> </tabView:SfTabItem> |
| 140 | + </tabView:SfTabView.Items> |
| 141 | + </tabView:SfTabView> |
| 142 | +</ContentPage> |
|
0 commit comments