about summary refs log tree commit diff
path: root/MatrixRoomUtils.Desktop/Components/NavigationStack.axaml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--MatrixRoomUtils.Desktop/Components/NavigationStack.axaml2
-rw-r--r--MatrixRoomUtils.Desktop/Components/NavigationStack.axaml.cs7
2 files changed, 4 insertions, 5 deletions
diff --git a/MatrixRoomUtils.Desktop/Components/NavigationStack.axaml b/MatrixRoomUtils.Desktop/Components/NavigationStack.axaml

index e0812ec..c773b8d 100644 --- a/MatrixRoomUtils.Desktop/Components/NavigationStack.axaml +++ b/MatrixRoomUtils.Desktop/Components/NavigationStack.axaml
@@ -3,7 +3,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" - x:Class="MatrixRoomUtils.Desktop.NavigationStack"> + x:Class="MatrixRoomUtils.Desktop.Components.NavigationStack"> <DockPanel x:Name="dock"> <StackPanel x:Name="navPanel"></StackPanel> <UserControl x:Name="content"></UserControl> diff --git a/MatrixRoomUtils.Desktop/Components/NavigationStack.axaml.cs b/MatrixRoomUtils.Desktop/Components/NavigationStack.axaml.cs
index f4e0fed..d6343e2 100644 --- a/MatrixRoomUtils.Desktop/Components/NavigationStack.axaml.cs +++ b/MatrixRoomUtils.Desktop/Components/NavigationStack.axaml.cs
@@ -1,8 +1,7 @@ -using Avalonia; using Avalonia.Controls; using Avalonia.Markup.Xaml; -namespace MatrixRoomUtils.Desktop; +namespace MatrixRoomUtils.Desktop.Components; public partial class NavigationStack : UserControl { public NavigationStack() { @@ -20,7 +19,7 @@ public partial class NavigationStack : UserControl { Button btn = new() { Content = item.Name }; - btn.Click += (sender, args) => { + btn.Click += (_, _) => { PopTo(_stack.IndexOf(item)); buildView(); }; @@ -41,7 +40,7 @@ public partial class NavigationStack : UserControl { public NavigationStackItem? Current => _stack.LastOrDefault(); public void Push(string name, UserControl view) { - _stack.Add(new NavigationStackItem() { + _stack.Add(new NavigationStackItem { Name = name, View = view });