-
Notifications
You must be signed in to change notification settings - Fork 1
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
d2e7ef1
commit e7cad72
Showing
7 changed files
with
77 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using BuildIt.Navigation.Messages; | ||
|
||
namespace MvvmNavigation.Messages | ||
{ | ||
public class PleadTheFifthMessage : CompletedMessage | ||
{ | ||
public PleadTheFifthMessage() : base() { } | ||
public PleadTheFifthMessage(object sender) : base(sender) { } | ||
} | ||
} |
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,20 @@ | ||
using BuildIt.Navigation; | ||
using BuildIt.Navigation.Messages; | ||
using System; | ||
|
||
namespace MvvmNavigation.ViewModels | ||
{ | ||
[Register] | ||
public class FifthViewModel | ||
{ | ||
[EventMessage(typeof(CloseMessage))] | ||
public event EventHandler FifthDone; | ||
|
||
public string Title => "Page 5"; | ||
|
||
public void RaiseFifthDone() | ||
{ | ||
FifthDone?.Invoke(this, EventArgs.Empty); | ||
} | ||
} | ||
} |
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 @@ | ||
<Page x:Class="MvvmNavigation.FifthPage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
|
||
<StackPanel VerticalAlignment="Center" | ||
HorizontalAlignment="Center"> | ||
<TextBlock Text="{x:Bind ViewModel.Title}" /> | ||
<Button Content="Go Back" | ||
Click="{x:Bind ViewModel.RaiseFifthDone}" /> | ||
</StackPanel> | ||
</Page> |
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,17 @@ | ||
using BuildIt.Navigation; | ||
using MvvmNavigation.ViewModels; | ||
|
||
namespace MvvmNavigation | ||
{ | ||
[ViewModel(typeof(FifthViewModel), nameof(InitViewModel))] | ||
public sealed partial class FifthPage | ||
{ | ||
partial void InitViewModel(); | ||
public FifthViewModel ViewModel => this.ViewModel(() => DataContext as FifthViewModel, () => InitViewModel()); | ||
|
||
public FifthPage() | ||
{ | ||
this.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
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