forked from CommunityToolkit/Maui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update TabViewPage and related types in sample project (CommunityTool…
…kit#121) * Remove the original csharp only implementation of `TabViewPage` and replaced it with a XAML with code-behind implementation. * Add `TabViewViewModel` for the `TabView` sample page.
- Loading branch information
1 parent
fc815ed
commit 43228da
Showing
4 changed files
with
64 additions
and
16 deletions.
There are no files selected for viewing
16 changes: 0 additions & 16 deletions
16
samples/CommunityToolkit.Maui.Sample/Pages/Views/TabViewPage.cs
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
samples/CommunityToolkit.Maui.Sample/Pages/Views/TabViewPage.xaml
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,46 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<pages:BasePage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:pages="clr-namespace:CommunityToolkit.Maui.Sample.Pages" | ||
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/tookit" | ||
xmlns:tv="clr-namespace:CommunityToolkit.Maui.Views.TabView;assembly=CommunityToolkit.Maui" | ||
x:Class="CommunityToolkit.Maui.Sample.Pages.Views.TabViewPage"> | ||
<Grid> | ||
<tv:TabView | ||
TabStripPlacement="Bottom" | ||
TabStripBackgroundColor="Blue" | ||
TabStripHeight="60" | ||
TabIndicatorColor="Yellow" | ||
TabContentBackgroundColor="Yellow"> | ||
|
||
<tv:TabViewItem | ||
Icon="triangle.png" | ||
Text="Tab 1" | ||
TextColor="White" | ||
TextColorSelected="Yellow" | ||
FontSize="12"> | ||
<Grid | ||
BackgroundColor="Gray"> | ||
<Label | ||
HorizontalOptions="Center" | ||
VerticalOptions="Center" | ||
Text="TabContent1" /> | ||
</Grid> | ||
</tv:TabViewItem> | ||
|
||
<tv:TabViewItem | ||
Icon="circle.png" | ||
Text="Tab 2" | ||
TextColor="White" | ||
TextColorSelected="Yellow" | ||
FontSize="12"> | ||
<Grid> | ||
<Label | ||
HorizontalOptions="Center" | ||
VerticalOptions="Center" | ||
Text="TabContent2" /> | ||
</Grid> | ||
</tv:TabViewItem> | ||
</tv:TabView> | ||
</Grid> | ||
</pages:BasePage> |
8 changes: 8 additions & 0 deletions
8
samples/CommunityToolkit.Maui.Sample/Pages/Views/TabViewPage.xaml.cs
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,8 @@ | ||
using CommunityToolkit.Maui.Sample.Pages; | ||
|
||
namespace CommunityToolkit.Maui.Sample; | ||
|
||
public partial class TabViewPage : BasePage | ||
{ | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
samples/CommunityToolkit.Maui.Sample/ViewModels/Views/TabViewViewModel.cs
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,10 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace CommunityToolkit.Maui.Sample.ViewModels.Views; | ||
public partial class TabViewViewModel : BaseViewModel | ||
{ | ||
} |