using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; namespace Titano.App.Sections; public partial class ServerView : UserControl { public ServerView() => InitializeComponent(); /// The ▾ button opens the list of servers found on the LAN under itself. private void OnShowKnown(object sender, RoutedEventArgs e) { if (KnownButton.ContextMenu is not { } menu) return; menu.DataContext = DataContext; menu.PlacementTarget = KnownButton; menu.Placement = PlacementMode.Bottom; menu.IsOpen = true; } }