-
-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d320b1
commit b5fb681
Showing
62 changed files
with
1,223 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version = "1.0" encoding = "UTF-8" ?> | ||
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:local="clr-namespace:MauiTabView" | ||
x:Class="MauiTabView.App"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="Resources/Styles/Colors.xaml" /> | ||
<ResourceDictionary Source="Resources/Styles/Styles.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace MauiTabView; | ||
|
||
public partial class App : Application | ||
{ | ||
public App() | ||
{ | ||
InitializeComponent(); | ||
|
||
MainPage = new AppShell(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<Shell | ||
x:Class="MauiTabView.AppShell" | ||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:local="clr-namespace:MauiTabView" | ||
Shell.FlyoutBehavior="Disabled" | ||
Title="MauiTabView"> | ||
|
||
<ShellContent | ||
Title="Home" | ||
ContentTemplate="{DataTemplate local:MainPage}" | ||
Route="MainPage" /> | ||
|
||
</Shell> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace MauiTabView; | ||
|
||
public partial class AppShell : Shell | ||
{ | ||
public AppShell() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:mauiTabView="clr-namespace:MauiTabView" | ||
x:Class="MauiTabView.MainPage" | ||
x:DataType="mauiTabView:MainPage"> | ||
|
||
<ScrollView> | ||
<VerticalStackLayout | ||
Spacing="25" | ||
Padding="30,0" | ||
VerticalOptions="Center"> | ||
<IndicatorView x:Name="Indicator" | ||
HorizontalOptions="Center"> | ||
<IndicatorView.IndicatorTemplate> | ||
<DataTemplate x:DataType="Tab"> | ||
<VerticalStackLayout> | ||
<Image Source="{Binding Icon}" /> | ||
<Label Text="1" FontSize="14"/> | ||
<Label Text="{Binding Title}" FontSize="12" /> | ||
</VerticalStackLayout> | ||
</DataTemplate> | ||
</IndicatorView.IndicatorTemplate> | ||
</IndicatorView> | ||
<CarouselView ItemsSource="{Binding Tabs}" | ||
IndicatorView="{x:Reference Indicator}" | ||
HorizontalScrollBarVisibility="Never" | ||
Loop="False" | ||
Position="0"> | ||
<CarouselView.ItemTemplate> | ||
<DataTemplate x:DataType="mauiTabView:Tab"> | ||
<ContentPresenter Content="{Binding Content}"/> | ||
</DataTemplate> | ||
</CarouselView.ItemTemplate> | ||
</CarouselView> | ||
|
||
<ScrollView Orientation="Horizontal"> | ||
<HorizontalStackLayout RadioButtonGroup.GroupName="tabs" | ||
BindableLayout.ItemsSource="{Binding Tabs}" | ||
RadioButtonGroup.SelectedValue="Tab1"> | ||
<BindableLayout.ItemTemplate> | ||
<DataTemplate x:DataType="Tab"> | ||
<RadioButton Value="{Binding Title}" | ||
Content="{Binding Title}"> | ||
</RadioButton> | ||
</DataTemplate> | ||
</BindableLayout.ItemTemplate> | ||
</HorizontalStackLayout> | ||
</ScrollView> | ||
|
||
<mauiTabView:TabView> | ||
<mauiTabView:TabView.Tabs> | ||
<mauiTabView:Tab Title="Tab1"> | ||
<mauiTabView:Tab.Content> | ||
<Label Text="Tab1 Label"></Label> | ||
</mauiTabView:Tab.Content> | ||
</mauiTabView:Tab> | ||
<mauiTabView:Tab Title="Tab2"> | ||
<mauiTabView:Tab.Content> | ||
<Label Text="Tab2 Label"></Label> | ||
</mauiTabView:Tab.Content> | ||
</mauiTabView:Tab> | ||
</mauiTabView:TabView.Tabs> | ||
</mauiTabView:TabView> | ||
|
||
<mauiTabView:TabView Tabs="{Binding Tabs2}"/> | ||
|
||
</VerticalStackLayout> | ||
</ScrollView> | ||
|
||
</ContentPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
namespace MauiTabView; | ||
|
||
using System.Collections.ObjectModel; | ||
using System.Globalization; | ||
|
||
public partial class MainPage : ContentPage | ||
{ | ||
public ObservableCollection<Tab> Tabs { get; set; } = new(); | ||
public ObservableCollection<Tab> Tabs2 { get; set; } = new(); | ||
|
||
public MainPage() | ||
{ | ||
InitializeComponent(); | ||
Tabs.Add(new Tab() | ||
{ | ||
Title = "Tab1", | ||
Content = new Label(){Text = "Tab1 Label"} | ||
}); | ||
Tabs.Add(new Tab() | ||
{ | ||
Title = "Tab2", | ||
Content = new Label(){Text = "Tab2 Label"} | ||
}); | ||
Tabs2.Add(new Tab() | ||
{ | ||
Title = "Tab1", | ||
Content = new Label(){Text = "Tab1 Label"} | ||
}); | ||
Tabs2.Add(new Tab() | ||
{ | ||
Title = "Tab2", | ||
Content = new Label(){Text = "Tab2 Label"} | ||
}); | ||
BindingContext = this; | ||
} | ||
} |
Oops, something went wrong.