This repository has been archived by the owner on Nov 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
35 changed files
with
605 additions
and
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
using mavvm.Interfaces; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Maui; | ||
using Microsoft.Maui.Controls; | ||
using Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific; | ||
|
||
namespace mavvmApp | ||
{ | ||
public partial class AppShell : Shell | ||
public partial class AppShell : IShellWithTabBar | ||
{ | ||
public AppShell() | ||
{ | ||
InitializeComponent(); | ||
} | ||
InitializeComponent(); | ||
|
||
TabBar = MainTabbar; | ||
} | ||
|
||
public TabBar TabBar { get; } | ||
} | ||
} |
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,32 @@ | ||
using System; | ||
using CommunityToolkit.Mvvm.Input; | ||
using mavvm; | ||
|
||
namespace mavvmApp.ViewModels | ||
{ | ||
public partial class LastPageViewModel : BindableBase, INavigateToAware | ||
{ | ||
|
||
[ICommand] | ||
async void GoBack() | ||
{ | ||
await BaseMethods.GoBack(parameters: new NavigationParameters {{"testKey3","testValue3" }}); | ||
} | ||
|
||
[ICommand] | ||
async void GoToSecondTabPage() | ||
{ | ||
await BaseMethods.GoToViewModel<SecondTabPageViewModel>(parameters: new NavigationParameters { { "testKey4", "testValue4" } }); | ||
} | ||
|
||
public void NavigatedTo(NavigationParameters parameters) | ||
{ | ||
Console.WriteLine(parameters); | ||
} | ||
|
||
public LastPageViewModel() | ||
{ | ||
} | ||
} | ||
} | ||
|
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,32 @@ | ||
using System; | ||
using CommunityToolkit.Mvvm.Input; | ||
using mavvm; | ||
|
||
namespace mavvmApp.ViewModels | ||
{ | ||
public partial class ThirdPageViewModel : BindableBase, INavigateToAware | ||
{ | ||
|
||
[ICommand] | ||
async void GoBack() | ||
{ | ||
await BaseMethods.GoBack(); | ||
} | ||
|
||
[ICommand] | ||
async void GoToLastPage() | ||
{ | ||
await BaseMethods.GoToViewModel<LastPageViewModel>(parameters: new NavigationParameters { { "testKey2", "testValue2" } }); | ||
} | ||
|
||
public void NavigatedTo(NavigationParameters parameters) | ||
{ | ||
Console.WriteLine(parameters); | ||
} | ||
|
||
public ThirdPageViewModel() | ||
{ | ||
} | ||
} | ||
} | ||
|
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,43 @@ | ||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:viewmodels="clr-namespace:mavvmApp.ViewModels" | ||
x:Class="mavvmApp.Views.LastPage" | ||
Title="{Binding Title}" | ||
BackgroundColor="{DynamicResource SecondaryColor}" | ||
Shell.PresentationMode="ModalAnimated"> | ||
|
||
|
||
<ScrollView> | ||
<Grid RowSpacing="25" RowDefinitions="Auto,Auto,Auto,Auto,*" | ||
Padding="{OnPlatform iOS='30,60,30,30', Default='30'}"> | ||
|
||
<Label | ||
Text="Hello, World!" | ||
Grid.Row="0" | ||
SemanticProperties.HeadingLevel="Level1" | ||
FontSize="32" | ||
HorizontalOptions="Center" /> | ||
|
||
<Label | ||
Text="Welcome to .NET Multi-platform App UI" | ||
Grid.Row="1" | ||
SemanticProperties.HeadingLevel="Level1" | ||
SemanticProperties.Description="Welcome to dot net Multi platform App U I" | ||
FontSize="18" | ||
HorizontalOptions="Center" /> | ||
|
||
<Label | ||
Text="{Binding Count, StringFormat='Current count: {0}'}" | ||
Grid.Row="2" | ||
FontSize="18" | ||
FontAttributes="Bold" | ||
HorizontalOptions="Center" /> | ||
|
||
<Button Text="GoBack" | ||
Grid.Row="3" Command="{Binding GoBackCommand}"/> | ||
<Button Text="Go to SecondTab" | ||
Grid.Row="4" Command="{Binding GoToSecondTabPageCommand}"/> | ||
|
||
</Grid> | ||
</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,14 @@ | ||
using System; | ||
using mavvmApp.ViewModels; | ||
using Microsoft.Maui.Controls; | ||
|
||
namespace mavvmApp.Views | ||
{ | ||
public partial class LastPage : ContentPage | ||
{ | ||
public LastPage() | ||
{ | ||
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
Oops, something went wrong.