|
2 | 2 | x:Class="JellyBox.MainPage" |
3 | 3 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:models="using:JellyBox.Models" |
| 6 | + xmlns:g="using:JellyBox" |
5 | 7 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 | 8 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
7 | 9 | mc:Ignorable="d" |
8 | 10 | Background="{StaticResource BackgroundBase}"> |
9 | 11 |
|
10 | 12 | <Grid XYFocusKeyboardNavigation="Enabled"> |
11 | | - <Frame x:Name="ContentFrame" /> |
| 13 | + <Grid.RowDefinitions> |
| 14 | + <RowDefinition Height="Auto" /> |
| 15 | + <RowDefinition Height="*" /> |
| 16 | + </Grid.RowDefinitions> |
| 17 | + |
| 18 | + <Grid |
| 19 | + Grid.Row="0" |
| 20 | + Padding="48,20,48,12" |
| 21 | + Background="{StaticResource BackgroundBase}" |
| 22 | + XYFocusKeyboardNavigation="Enabled"> |
| 23 | + <AutoSuggestBox |
| 24 | + x:Name="SearchBox" |
| 25 | + MaxWidth="720" |
| 26 | + HorizontalAlignment="Stretch" |
| 27 | + IsTabStop="False" |
| 28 | + PlaceholderText="Search movies and TV shows" |
| 29 | + Style="{StaticResource SearchAutoSuggestBox}" |
| 30 | + ItemsSource="{x:Bind ViewModel.Search.Suggestions, Mode=OneWay}" |
| 31 | + TextChanged="SearchBox_TextChanged" |
| 32 | + QuerySubmitted="SearchBox_QuerySubmitted" |
| 33 | + SuggestionChosen="SearchBox_SuggestionChosen" |
| 34 | + LostFocus="SearchBox_LostFocus" |
| 35 | + XYFocusKeyboardNavigation="Enabled"> |
| 36 | + <AutoSuggestBox.QueryIcon> |
| 37 | + <SymbolIcon Symbol="Find" /> |
| 38 | + </AutoSuggestBox.QueryIcon> |
| 39 | + <AutoSuggestBox.ItemTemplate> |
| 40 | + <DataTemplate x:DataType="models:SearchSuggestion"> |
| 41 | + <StackPanel Orientation="Horizontal" Spacing="12" Padding="4,10"> |
| 42 | + <FontIcon |
| 43 | + FontFamily="{StaticResource SegoeIcons}" |
| 44 | + Glyph="{x:Bind g:Glyphs.Search}" |
| 45 | + FontSize="16" |
| 46 | + Foreground="{StaticResource TextMuted}" |
| 47 | + VerticalAlignment="Center" /> |
| 48 | + <StackPanel Spacing="2" VerticalAlignment="Center"> |
| 49 | + <TextBlock |
| 50 | + Text="{x:Bind DisplayText}" |
| 51 | + FontSize="{StaticResource FontS}" |
| 52 | + Foreground="{StaticResource TextPrimary}" /> |
| 53 | + <TextBlock |
| 54 | + Text="{x:Bind SecondaryText}" |
| 55 | + FontSize="{StaticResource FontXS}" |
| 56 | + Foreground="{StaticResource TextMuted}" /> |
| 57 | + </StackPanel> |
| 58 | + </StackPanel> |
| 59 | + </DataTemplate> |
| 60 | + </AutoSuggestBox.ItemTemplate> |
| 61 | + </AutoSuggestBox> |
| 62 | + </Grid> |
| 63 | + |
| 64 | + <Frame x:Name="ContentFrame" Grid.Row="1" /> |
12 | 65 |
|
13 | 66 | <Grid |
14 | 67 | x:Name="NavigationOverlay" |
| 68 | + Grid.Row="0" |
| 69 | + Grid.RowSpan="2" |
15 | 70 | Visibility="Collapsed" |
16 | 71 | XYFocusKeyboardNavigation="Enabled"> |
17 | 72 |
|
|
0 commit comments