diff --git a/ModernWpf.Controls/NavigationView/NavigationView.cs b/ModernWpf.Controls/NavigationView/NavigationView.cs index 50a6df84..eb31b595 100644 --- a/ModernWpf.Controls/NavigationView/NavigationView.cs +++ b/ModernWpf.Controls/NavigationView/NavigationView.cs @@ -1849,18 +1849,7 @@ void UpdatePaneButtonsWidths() { var templateSettings = GetTemplateSettings(); - double newButtonWidths; - { - double init() - { - if (DisplayMode == NavigationViewDisplayMode.Minimal) - { - return c_paneToggleButtonWidth; - } - return CompactPaneLength; - } - newButtonWidths = init(); - } + var newButtonWidths = CompactPaneLength; templateSettings.PaneToggleButtonWidth = newButtonWidths; templateSettings.SmallerPaneToggleButtonWidth = newButtonWidths - 8; diff --git a/ModernWpf.Controls/NavigationView/NavigationView.xaml b/ModernWpf.Controls/NavigationView/NavigationView.xaml index 0cb1d832..dbe6eaf6 100644 --- a/ModernWpf.Controls/NavigationView/NavigationView.xaml +++ b/ModernWpf.Controls/NavigationView/NavigationView.xaml @@ -550,7 +550,7 @@ x:Name="IconBox" Height="16" Width="16" - Margin="12,0,0,0" + Margin="16,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"> + MinWidth="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.SmallerPaneToggleButtonWidth}" + ui:FocusVisualHelper.FocusVisualMargin="0"> + @@ -1255,7 +1257,19 @@ x:Name="PaneAutoSuggestButton" Visibility="Collapsed" Style="{DynamicResource NavigationViewPaneSearchButtonStyle}" - Width="{TemplateBinding CompactPaneLength}"/> + Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.SmallerPaneToggleButtonWidth}"> + + + + + + + + + + + + - + diff --git a/ModernWpf/Styles/NavigationView.xaml b/ModernWpf/Styles/NavigationView.xaml index e31efaa4..6efb0d5d 100644 --- a/ModernWpf/Styles/NavigationView.xaml +++ b/ModernWpf/Styles/NavigationView.xaml @@ -13,10 +13,10 @@ 10,0,16,0 12,0,12,0 34 - 46 + 38 46 38 - 48 + 40 40 40 40 @@ -27,7 +27,7 @@ 1 1 - 1 + 0 1 11,0,11,0 12,0 @@ -68,7 +68,6 @@ - @@ -76,7 +75,8 @@ - + + @@ -141,7 +141,10 @@