using System; using System.Windows; using System.Windows.Controls; namespace ParsecVDisplay.Components { public partial class CloseButton : UserControl { public CloseButton() { InitializeComponent(); } private void Button_Click(object sender, RoutedEventArgs e) { var window = Window.GetWindow(this); window?.Close(); } } }