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 sample application with a ViewsGalleryPage and child TabViewPa…
…ge (CommunityToolkit#121)
- Loading branch information
1 parent
7ee6be5
commit cae39aa
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
samples/CommunityToolkit.Maui.Sample/Pages/Views/TabViewPage.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,16 @@ | ||
using CommunityToolkit.Maui.Sample.Pages; | ||
using CommunityToolkit.Maui.Views.TabView; | ||
|
||
namespace CommunityToolkit.Maui.Sample.ViewModels.Views; | ||
|
||
class TabViewPage : BasePage | ||
{ | ||
public TabViewPage() | ||
{ | ||
Title = nameof(TabView); | ||
Content = new ScrollView() | ||
{ | ||
Content = new TabView() | ||
}; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
samples/CommunityToolkit.Maui.Sample/Pages/Views/ViewsGalleryPage.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,11 @@ | ||
using CommunityToolkit.Maui.Sample.Pages; | ||
using CommunityToolkit.Maui.Sample.ViewModels.Views; | ||
|
||
namespace CommunityToolkit.Maui.Sample; | ||
|
||
public partial class ViewsGalleryPage : BaseGalleryPage<ViewsGalleryViewModel> | ||
{ | ||
public ViewsGalleryPage() : base("Views") | ||
{ | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
samples/CommunityToolkit.Maui.Sample/ViewModels/Views/ViewsGalleryViewModel.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,20 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using CommunityToolkit.Maui.Sample.Models; | ||
using CommunityToolkit.Maui.Views.TabView; | ||
|
||
namespace CommunityToolkit.Maui.Sample.ViewModels.Views; | ||
|
||
public class ViewsGalleryViewModel : BaseGalleryViewModel | ||
{ | ||
protected override IEnumerable<SectionModel> CreateItems() => new[] { | ||
new SectionModel( | ||
typeof(TabViewPage), | ||
nameof(TabView), | ||
"Use the TabView control when you need to provide heirarchical navigation") | ||
}; | ||
} |