diff options
author | Rory& <root@rory.gay> | 2024-04-05 19:01:39 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-04-05 19:02:00 +0200 |
commit | 9319fe76c56b79e0933c09280fe32658c2f176c7 (patch) | |
tree | afc31b8b8b2a683b549e352237e2260efe97fba6 /MatrixUtils.Desktop | |
parent | Changes (diff) | |
download | MatrixUtils-9319fe76c56b79e0933c09280fe32658c2f176c7.tar.xz |
Cleanup, work on index2, some tooling updates
Diffstat (limited to 'MatrixUtils.Desktop')
-rw-r--r-- | MatrixUtils.Desktop/Components/NavigationStack.axaml.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/MatrixUtils.Desktop/Components/NavigationStack.axaml.cs b/MatrixUtils.Desktop/Components/NavigationStack.axaml.cs index 632ae3c..4e962a7 100644 --- a/MatrixUtils.Desktop/Components/NavigationStack.axaml.cs +++ b/MatrixUtils.Desktop/Components/NavigationStack.axaml.cs @@ -10,23 +10,24 @@ public partial class NavigationStack : UserControl { } // private void InitializeComponent() { - // AvaloniaXamlLoader.Load(this); - // buildView(); + // AvaloniaXamlLoader.Load(this); + // buildView(); // } protected override void OnLoaded(RoutedEventArgs e) { base.OnLoaded(e); buildView(); } - + private void buildView() { if (navPanel is null) { Console.WriteLine("NavigationStack buildView called while navpanel is null!"); // await Task.Delay(100); // if (navPanel is null) - // await buildView(); + // await buildView(); // else Console.WriteLine("navpanel is not null!"); } + navPanel.Children.Clear(); foreach (var item in _stack) { Button btn = new() { @@ -38,10 +39,10 @@ public partial class NavigationStack : UserControl { }; navPanel.Children.Add(btn); } + content.Content = Current?.View ?? new UserControl(); } - public class NavigationStackItem { public string Name { get; set; } public string Description { get; set; } = ""; @@ -69,4 +70,4 @@ public partial class NavigationStack : UserControl { _stack.RemoveRange(index, _stack.Count - index); buildView(); } -} +} \ No newline at end of file |