From c1e832e08dc548a3aa846863bb861dc4cbe51562 Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 12 May 2026 22:19:07 +0200 Subject: [PATCH] EPG-Grid: Tooltip mit TextWrapping und 30s ShowDuration --- MainWindow.xaml.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 74dc07d..bd1c454 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -993,11 +993,17 @@ public partial class MainWindow : Window BorderBrush = new System.Windows.Media.SolidColorBrush(borderColor), BorderThickness = new Thickness(1), CornerRadius = new CornerRadius(3), Cursor = Cursors.Hand, - ToolTip = $"{ev.StartTime:HH:mm}–{ev.EndTime:HH:mm}\n{ev.Title}" + - (string.IsNullOrWhiteSpace(ev.Description) ? "" : $"\n\n{ev.Description}"), Tag = ch, Child = content }; + // Tooltip mit Zeilenumbruch und Beschreibung + var ttText = $"{ev.StartTime:HH:mm}\u2013{ev.EndTime:HH:mm} {ev.Title}"; + if (!string.IsNullOrWhiteSpace(ev.Description)) + ttText += $"\n\n{ev.Description}"; + var tt = new ToolTip { MaxWidth = 420, Content = new TextBlock { Text = ttText, TextWrapping = TextWrapping.Wrap, FontSize = 12 } }; + ToolTipService.SetShowDuration(box, 30000); + box.ToolTip = tt; + box.MouseEnter += (_, _) => box.Background = new System.Windows.Media.SolidColorBrush( isCurrent ? System.Windows.Media.Color.FromRgb(0xB8, 0x21, 0x3A) : System.Windows.Media.Color.FromRgb(0x36, 0x36, 0x36));