|
70 | 70 | Text="{helpers:ResourceString Name=Actions}" /> |
71 | 71 |
|
72 | 72 | <!-- Subtitle --> |
73 | | - <Grid ColumnSpacing="12"> |
| 73 | + <Grid ColumnSpacing="8" RowSpacing="8"> |
74 | 74 | <Grid.ColumnDefinitions> |
75 | 75 | <ColumnDefinition Width="*" /> |
76 | 76 | <ColumnDefinition Width="Auto" /> |
77 | 77 | <ColumnDefinition Width="Auto" /> |
78 | 78 | </Grid.ColumnDefinitions> |
79 | 79 |
|
| 80 | + <Grid.RowDefinitions> |
| 81 | + <RowDefinition Height="Auto" /> |
| 82 | + <RowDefinition Height="Auto" /> |
| 83 | + </Grid.RowDefinitions> |
| 84 | + |
80 | 85 | <!-- Subtitle Text --> |
81 | 86 | <TextBlock |
82 | 87 | Margin="0,8,0,4" |
83 | 88 | FontSize="16" |
84 | 89 | FontWeight="Medium" |
85 | 90 | Text="{helpers:ResourceString Name=Commands}" /> |
86 | 91 |
|
87 | | - <!-- Show Add New Section Button --> |
88 | | - <Button |
89 | | - x:Name="ShowAddNewGridButton" |
| 92 | + <TextBox |
| 93 | + x:Name="SearchBox" |
90 | 94 | Grid.Column="1" |
91 | | - Command="{x:Bind ViewModel.ShowAddNewKeyBindingBlockCommand, Mode=OneWay}" |
92 | | - Content="{helpers:ResourceString Name=AddCommand}" |
93 | | - IsEnabled="{x:Bind ViewModel.ShowAddNewKeyBindingBlock, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}" /> |
| 95 | + MinWidth="200" |
| 96 | + PlaceholderText="{helpers:ResourceString Name=Search}" |
| 97 | + TextChanged="SearchBox_TextChanged" /> |
94 | 98 |
|
95 | | - <!-- Restore Defaults Button --> |
96 | | - <Button |
97 | | - x:Name="RestoreDefaultsButton" |
| 99 | + <StackPanel |
| 100 | + x:Name="CommandStackPanel" |
98 | 101 | Grid.Column="2" |
99 | | - Command="{x:Bind ViewModel.ShowRestoreDefaultsConfirmationCommand, Mode=OneWay}" |
100 | | - Content="{helpers:ResourceString Name=RestoreDefaults}" /> |
| 102 | + Orientation="Horizontal" |
| 103 | + Spacing="8"> |
| 104 | + <!-- Add New Action Button --> |
| 105 | + <Button |
| 106 | + x:Name="AddNewGridButton" |
| 107 | + Command="{x:Bind ViewModel.ShowAddNewKeyBindingBlockCommand, Mode=OneWay}" |
| 108 | + Content="{helpers:ResourceString Name=AddCommand}" |
| 109 | + IsEnabled="{x:Bind ViewModel.ShowAddNewKeyBindingBlock, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}" /> |
| 110 | + |
| 111 | + <!-- Restore Defaults Button --> |
| 112 | + <Button |
| 113 | + x:Name="RestoreDefaultsButton" |
| 114 | + Command="{x:Bind ViewModel.ShowRestoreDefaultsConfirmationCommand, Mode=OneWay}" |
| 115 | + Content="{helpers:ResourceString Name=RestoreDefaults}" /> |
| 116 | + </StackPanel> |
101 | 117 | </Grid> |
102 | 118 |
|
103 | 119 | <!-- New Key Binding Block --> |
|
184 | 200 | <!-- List Of Available Key Bindings --> |
185 | 201 | <ListView |
186 | 202 | x:Name="ValidKeyBindingsListView" |
187 | | - ItemsSource="{x:Bind ViewModel.ValidActionItems, Mode=OneWay}" |
| 203 | + ItemsSource="{x:Bind ViewModel.FilteredActionItems, Mode=OneWay}" |
188 | 204 | ScrollViewer.HorizontalScrollBarVisibility="Hidden" |
189 | 205 | ScrollViewer.HorizontalScrollMode="Disabled" |
190 | 206 | ScrollViewer.VerticalScrollBarVisibility="Hidden" |
|
392 | 408 | PreferredPlacement="Bottom" |
393 | 409 | Subtitle="{helpers:ResourceString Name=KeybindingInvalidKeyNotification}" /> |
394 | 410 |
|
| 411 | + <VisualStateManager.VisualStateGroups> |
| 412 | + <VisualStateGroup> |
| 413 | + <VisualState x:Name="DefaultState"> |
| 414 | + <VisualState.StateTriggers> |
| 415 | + <AdaptiveTrigger MinWindowWidth="880" /> |
| 416 | + </VisualState.StateTriggers> |
| 417 | + <VisualState.Setters> |
| 418 | + <Setter Target="CommandStackPanel.(Grid.Column)" Value="2" /> |
| 419 | + <Setter Target="CommandStackPanel.(Grid.ColumnSpan)" Value="2" /> |
| 420 | + <Setter Target="CommandStackPanel.(Grid.Row)" Value="0" /> |
| 421 | + </VisualState.Setters> |
| 422 | + </VisualState> |
| 423 | + <VisualState x:Name="CompactState"> |
| 424 | + <VisualState.StateTriggers> |
| 425 | + <AdaptiveTrigger MinWindowWidth="0" /> |
| 426 | + </VisualState.StateTriggers> |
| 427 | + <VisualState.Setters> |
| 428 | + <Setter Target="CommandStackPanel.(Grid.ColumnSpan)" Value="3" /> |
| 429 | + <Setter Target="CommandStackPanel.(Grid.Column)" Value="0" /> |
| 430 | + <Setter Target="CommandStackPanel.(Grid.Row)" Value="1" /> |
| 431 | + <Setter Target="SearchBox.(Grid.Column)" Value="2" /> |
| 432 | + </VisualState.Setters> |
| 433 | + </VisualState> |
| 434 | + </VisualStateGroup> |
| 435 | + </VisualStateManager.VisualStateGroups> |
395 | 436 | </Grid> |
396 | 437 | </Page> |
0 commit comments