private void Finish() { Window window = VisualTreeHelpers.GetParent <Window>(this); window?.Close(); }