From 5a1a54e9ffa1779ee391bc337bd4290055fb6f56 Mon Sep 17 00:00:00 2001 From: Meik Date: Thu, 5 Mar 2026 11:10:35 +0100 Subject: [PATCH] Group header actions and restore refresh/close button behavior --- MainWindow.xaml | 68 +++++++++++++++++++++++++++++----------------- MainWindow.xaml.cs | 26 ++++++++++++++++++ 2 files changed, 69 insertions(+), 25 deletions(-) diff --git a/MainWindow.xaml b/MainWindow.xaml index f1c7c67..4498007 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -294,6 +294,18 @@ + @@ -341,34 +353,40 @@ HorizontalAlignment="Left" Margin="14,14,0,0" x:Name="Logo" /> - - + CornerRadius="10" + BorderThickness="1" + BorderBrush="{DynamicResource panelBorderColor}" + Background="{DynamicResource headerControlBackgroundColor}"> + + + + + + (source) != null) + return; + if (e.ChangedButton == MouseButton.Left && ConfigSettings.GetConfig()._isDraggable) this.DragMove(); } @@ -1633,6 +1646,19 @@ namespace C4IT_CustomerPanel } } + private static T FindVisualParent(DependencyObject source) where T : DependencyObject + { + while (source != null) + { + if (source is T target) + return target; + + source = VisualTreeHelper.GetParent(source); + } + + return null; + } + private void App_KeyDown(object sender, KeyEventArgs e) { if (((Keyboard.Modifiers & ModifierKeys.Alt) == ModifierKeys.Alt) && Keyboard.IsKeyDown(Key.R) && ConfigSettings.GetConfig()._isDraggable)