From 292a8666c1b273ea18a46ce0ff0f2efcb01a1c63 Mon Sep 17 00:00:00 2001 From: Yimeng Wu Date: Sun, 19 Nov 2023 23:27:53 +0000 Subject: [PATCH 1/2] Port microsoft/microsoft-ui-xaml#4569 (#618) --- ModernWpf/ControlsResources.xaml | 6 +++--- test/ModernWpfTestApp/CommonStylesPage.xaml.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ModernWpf/ControlsResources.xaml b/ModernWpf/ControlsResources.xaml index c3cb4cd3..32048e82 100644 --- a/ModernWpf/ControlsResources.xaml +++ b/ModernWpf/ControlsResources.xaml @@ -65,9 +65,9 @@ 10,0,0,0 0,0,0,4 10,5,6,6 - 0,0,0,0 - 6 - 6 + 0,0,0,4 + 10 + 10 154 1 diff --git a/test/ModernWpfTestApp/CommonStylesPage.xaml.cs b/test/ModernWpfTestApp/CommonStylesPage.xaml.cs index abfa5cde..dcc17750 100644 --- a/test/ModernWpfTestApp/CommonStylesPage.xaml.cs +++ b/test/ModernWpfTestApp/CommonStylesPage.xaml.cs @@ -124,9 +124,9 @@ private void ToggleSwitchDensityTest_Click(object sender, RoutedEventArgs e) var contentPresenter = (ContentPresenter)root.FindName("HeaderContentPresenter"); simpleVerify.IsTrue(contentPresenter != null, "HeaderContentPresenter can't be found"); - string expectedHeaderMargin = "0,0,0,0"; - string expectToggleSwitchPreContentMargin = "6"; - string expectToggleSwitchPostContentMargin = "6"; + string expectedHeaderMargin = "0,0,0,4"; + string expectToggleSwitchPreContentMargin = "10"; + string expectToggleSwitchPostContentMargin = "10"; if (contentPresenter != null) { From a0a3cd43907238269dc7021afae6d199cd6e50c0 Mon Sep 17 00:00:00 2001 From: Yimeng Wu Date: Sun, 19 Nov 2023 23:35:34 +0000 Subject: [PATCH 2/2] Port microsoft/microsoft-ui-xaml#4624 (#619) --- 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 {