using Avalonia.Controls; using Avalonia.Input; namespace DodoSSH.Client.App.Views; /// /// The hosts screen: the host list, and an overview of the one that is selected. /// /// /// Its data context is the shell rather than the vault, unlike and /// . The sidebar is handed the vault from inside the markup; everything else here /// reaches it through Vault.*. That split is not tidiness — this element's visibility is the shell's /// business and the sidebar's bindings are the vault's, and an element carrying both resolves the first /// against the second, where it does not exist. /// internal sealed partial class HostsScreen : UserControl { public HostsScreen() => InitializeComponent(); /// Where the keyboard lands when this screen is the one showing. /// /// Forwarded to the sidebar, which answers for itself: the host list can be folded away, and /// Focus() on a collapsed control is measurably a no-op that is not replayed when the control is /// revealed. Nothing in the right column can take the keyboard — it is a heading and three sentences. /// internal IInputElement KeyboardTarget => Sidebar.KeyboardTarget; }