Skip to content

Commit aafdd1b

Browse files
committed
Make GridSplitter Invisible for SearchBox Resize
1 parent f3ceaa4 commit aafdd1b

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

Files/Controls/RibbonArea.xaml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,33 @@
913913
</Setter.Value>
914914
</Setter>
915915
</Style>
916+
<SolidColorBrush x:Key="SystemControlSplitterPointerOver" Color="{ThemeResource SystemBaseLowColor}"/>
917+
<SolidColorBrush x:Key="SystemControlSplitterPressed" Color="{ThemeResource SystemBaseHighColor}"/>
918+
<Style x:Key="GridSplitterStyle_Invisible" TargetType="Custom:GridSplitter">
919+
<Setter Property="IsTabStop" Value="True"/>
920+
<Setter Property="UseSystemFocusVisuals" Value="True"/>
921+
<Setter Property="HorizontalAlignment" Value="Stretch"/>
922+
<Setter Property="VerticalAlignment" Value="Stretch"/>
923+
<Setter Property="IsFocusEngagementEnabled" Value="True"/>
924+
<Setter Property="MinWidth" Value="2"/>
925+
<Setter Property="MinHeight" Value="16"/>
926+
<Setter Property="Background" Value="{ThemeResource SystemControlHighlightChromeHighBrush}"/>
927+
<Setter Property="GripperForeground" Value="{ThemeResource SystemControlForegroundAltHighBrush}"/>
928+
<Setter Property="Template">
929+
<Setter.Value>
930+
<ControlTemplate TargetType="Custom:GridSplitter">
931+
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
932+
<VisualStateManager.VisualStateGroups>
933+
<VisualStateGroup x:Name="GridSplitterStates">
934+
<VisualState x:Name="Normal"/>
935+
</VisualStateGroup>
936+
</VisualStateManager.VisualStateGroups>
937+
<ContentPresenter Content="{TemplateBinding Element}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"/>
938+
</Grid>
939+
</ControlTemplate>
940+
</Setter.Value>
941+
</Setter>
942+
</Style>
916943

917944
</UserControl.Resources>
918945

@@ -1231,7 +1258,7 @@
12311258
</ListView>
12321259
</Grid>
12331260
</Grid>
1234-
<Custom:GridSplitter x:Name="SearchBoxResizer" Foreground="Transparent" Background="Transparent" GripperCursor="SizeWestEast" HorizontalAlignment="Right" Width="Auto" Grid.Column="1" ResizeBehavior="CurrentAndNext" ResizeDirection="Columns"/>
1261+
<Custom:GridSplitter Style="{StaticResource GridSplitterStyle_Invisible}" Element="{x:Null}" x:Name="SearchBoxResizer" GripperForeground="Transparent" Background="Transparent" GripperCursor="SizeWestEast" HorizontalAlignment="Right" MinWidth="4" Width="4" Grid.Column="1" ResizeBehavior="CurrentAndNext" ResizeDirection="Columns"/>
12351262
<AutoSuggestBox MaxWidth="485" QueryIcon="Find" PlaceholderText="Search" x:Name="SearchReigon" Grid.Column="2" Margin="0,0,4,0" VerticalAlignment="Center">
12361263
<AutoSuggestBox.Resources>
12371264
<StaticResource x:Key="TextControlBorderBrush" ResourceKey="CustomInputFieldBorderBrush"/>

0 commit comments

Comments
 (0)