demonstracte navigating to child pages.
MODIFY
WalletWasabi.Fluent/ViewModels/NavBarItemViewModel.cs
WalletWasabi.Fluent/ViewModels/NavBarItemViewModel.cs
using ReactiveUI;
using System;
+using System.Windows.Input;
namespace WalletWasabi.Fluent.ViewModels
{
@@ -16,7 +17,14 @@ namespace WalletWasabi.Fluent.ViewModels
public SettingsPageViewModel(IScreen screen) : base(screen)
{
Title = "Settings";
+
+ NextCommand = ReactiveCommand.Create(() =>
+ {
+ screen.Router.Navigate.Execute(new HomePageViewModel(screen));
+ });
}
+
+ public ICommand NextCommand { get; }
}
public class AddWalletPageViewModel : NavBarItemViewModel

MODIFY
WalletWasabi.Fluent/Views/MainView.axaml
WalletWasabi.Fluent/Views/MainView.axaml
<DockPanel>
<local:StatusBar DockPanel.Dock="Bottom" DataContext="{Binding StatusBar}" VerticalAlignment="Bottom" Height="32" TextBlock.FontSize="12" />
<Panel Margin="20 20 20 0">
+ <DockPanel>
+ <StackPanel Orientation="Horizontal" Spacing="20" VerticalAlignment="Top">
+ <Button Command="{Binding NavBar.GoBack}" Background="Transparent" IsVisible="{Binding NavBar.IsBackButtonVisible}">
+ <PathIcon Data="{StaticResource arrow_left_regular}" />
+ </Button>
+ <TextBlock Text="{Binding NavBar.SelectedItem.Title}" FontSize="28" />
+ </StackPanel>
<rxui:RoutedViewHost Router="{Binding Router}">
<rxui:RoutedViewHost.ViewLocator>
<vl:ScreenViewLocator />
</rxui:RoutedViewHost.ViewLocator>
<rxui:RoutedViewHost.PageTransition>
- <CrossFade Duration="0:0:0.25" />
+ <CrossFade Duration="0:0:0.1" />
</rxui:RoutedViewHost.PageTransition>
<rxui:RoutedViewHost.DefaultContent>
<TextBlock Text="Default content"
VerticalAlignment="Center" />
</rxui:RoutedViewHost.DefaultContent>
</rxui:RoutedViewHost>
+ </DockPanel>
</Panel>
</DockPanel>
</Panel>

MODIFY
WalletWasabi.Fluent/Views/NavBar.axaml
WalletWasabi.Fluent/Views/NavBar.axaml
</UserControl.DataTemplates>
<DockPanel Margin="1">
<StackPanel DockPanel.Dock="Top" Margin="0 20 0 0">
- <Button Command="{Binding GoBack}" Background="Transparent" IsVisible="{Binding IsBackButtonVisible}">
- <PathIcon Data="{StaticResource arrow_left_regular}" />
- </Button>
<TextBlock Text="Wasabi Wallet" Foreground="White" FontSize="16" Margin="15 10 0 10" />
<ListBox Items="{Binding TopItems}" SelectedItem="{Binding SelectedItem}" />

MODIFY
WalletWasabi.Fluent/Views/SettingsPageView.axaml
WalletWasabi.Fluent/Views/SettingsPageView.axaml
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="WalletWasabi.Fluent.Views.SettingsPageView">
+ <Panel>
<TextBlock Text="Settings" FontSize="22" VerticalAlignment="Center" HorizontalAlignment="Center" />
+ <Button Command="{Binding NextCommand}" Content="Next" />
+ </Panel>
</UserControl>

demonstracte navigating to child pages.