From 2505864b5f40ef40e14d83812f1081e66071541d Mon Sep 17 00:00:00 2001 From: Yimeng Wu Date: Sun, 19 Nov 2023 23:29:40 +0000 Subject: [PATCH] Port microsoft/microsoft-ui-xaml#4624 --- ModernWpf.Controls/NavigationView/NavigationView.xaml | 10 +++------- .../NavigationView/NavigationViewItem.cs | 6 +++++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ModernWpf.Controls/NavigationView/NavigationView.xaml b/ModernWpf.Controls/NavigationView/NavigationView.xaml index 991f5e7e..0cb1d832 100644 --- a/ModernWpf.Controls/NavigationView/NavigationView.xaml +++ b/ModernWpf.Controls/NavigationView/NavigationView.xaml @@ -206,13 +206,9 @@ - - - - 16 - - - + + + diff --git a/ModernWpf.Controls/NavigationView/NavigationViewItem.cs b/ModernWpf.Controls/NavigationView/NavigationViewItem.cs index 39784342..ea4d59ae 100644 --- a/ModernWpf.Controls/NavigationView/NavigationViewItem.cs +++ b/ModernWpf.Controls/NavigationView/NavigationViewItem.cs @@ -240,7 +240,11 @@ void UpdateNavigationViewItemToolTip() { if (ShouldEnableToolTip()) { - ToolTipService.SetToolTip(this, m_suggestedToolTipContent); + // Don't SetToolTip with the same parameter because it close/re-open the ToolTip + if (toolTipContent != m_suggestedToolTipContent) + { + ToolTipService.SetToolTip(this, m_suggestedToolTipContent); + } } else {