using Avalonia.Controls; using Avalonia.Controls.Primitives; using Avalonia.Interactivity; using DodoSSH.Client.Shell.ViewModels; namespace DodoSSH.Client.App.Views; /// The window's destinations, down the left edge — the switcher, the six rail rows and the user chip. internal sealed partial class NavRail : UserControl { public NavRail() => InitializeComponent(); /// Opens the user popover. /// /// A handler rather than relying on the click that opening a Flyout answers to on its own: a /// named method is a thing a test can call directly, where an implicit open is not. /// private void OnUserChipPressed(object? sender, RoutedEventArgs e) { if (sender is Control chip) { FlyoutBase.ShowAttachedFlyout(chip); } } /// Hides the popover, whatever handler is about to navigate. private void ClosePopover() { if (this.FindControl