using Avalonia; using Avalonia.Controls; namespace DodoSSH.Client.App.Views; /// /// The v5b session sidebar: QUICK ACCESS on both surfaces, SNIPS on the terminal's own. See the remark at /// the top of SessionSidebar.axaml. /// internal sealed partial class SessionSidebar : UserControl { /// Whether the SNIPS section draws below QUICK ACCESS. /// /// Set from the usage site rather than inferred from a surface flag on the shell, for the same reason /// is: which sections a particular instance of this control shows /// is a fact about where it was placed in MainWindow.axaml, not one this control can read off its /// own DataContext. /// internal static readonly StyledProperty ShowsSnipsProperty = AvaloniaProperty.Register(nameof(ShowsSnips)); /// Whether the FORWARDS section draws. The terminal's own, for the reason SNIPS is. internal static readonly StyledProperty ShowsForwardsProperty = AvaloniaProperty.Register(nameof(ShowsForwards)); public SessionSidebar() => InitializeComponent(); internal bool ShowsSnips { get => GetValue(ShowsSnipsProperty); set => SetValue(ShowsSnipsProperty, value); } internal bool ShowsForwards { get => GetValue(ShowsForwardsProperty); set => SetValue(ShowsForwardsProperty, value); } }