Skip to content

Commit 06f6f99

Browse files
committed
Align Search Button With Search Box
1 parent 9100f58 commit 06f6f99

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Files UWP/ProHome.xaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -643,13 +643,13 @@
643643

644644
</TextBox>
645645

646-
<StackPanel Margin="0,0,5,0" Grid.Column="2" Orientation="Horizontal">
647-
<TextBox Style="{StaticResource TextBoxStyleForPathBar}" Padding="5" Windows10version1809:CornerRadius="5,0,0,5" BorderThickness="1" Margin="0,5,0,5" VerticalAlignment="Stretch" PlaceholderText="Search" Width="260">
646+
<StackPanel Margin="0,5,5,5" Grid.Column="2" Orientation="Horizontal">
647+
<TextBox Name="SearchBox" Style="{StaticResource TextBoxStyleForPathBar}" Padding="5" Windows10version1809:CornerRadius="5,0,0,5" BorderThickness="1" VerticalAlignment="Stretch" PlaceholderText="Search" Width="260">
648648
<TextBox.KeyboardAccelerators>
649-
<KeyboardAccelerator Modifiers="Control" Key="F"/>
649+
<KeyboardAccelerator Invoked="KeyboardAccelerator_Invoked" Modifiers="Control" Key="F"/>
650650
</TextBox.KeyboardAccelerators>
651651
</TextBox>
652-
<Button BorderBrush="{StaticResource SystemAccentColor}" Width="35" BorderThickness="1" Margin="0,5,0,5.5" VerticalAlignment="Stretch" Windows10version1809:CornerRadius="0,5,5,0" Background="{StaticResource SystemAccentColor}">
652+
<Button BorderBrush="{StaticResource SystemAccentColor}" Width="35" BorderThickness="1" VerticalAlignment="Stretch" Windows10version1809:CornerRadius="0,5,5,0" Background="{StaticResource SystemAccentColor}">
653653
<FontIcon FontSize="12" Foreground="White" Glyph="&#xEBE7;"/>
654654
</Button>
655655
</StackPanel>

Files UWP/ProHome.xaml.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,10 @@ private void ItemDisplayFrame_Navigating(object sender, Windows.UI.Xaml.Navigati
957957

958958
}
959959

960+
private void KeyboardAccelerator_Invoked(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args)
961+
{
962+
SearchBox.Focus(FocusState.Programmatic);
963+
}
960964
}
961965
public class NavigationActions
962966
{

0 commit comments

Comments
 (0)