|
76 | 76 | </Grid> |
77 | 77 |
|
78 | 78 | <!-- Context picker --> |
79 | | - <Grid |
80 | | - Grid.Row="1" |
81 | | - Padding="16,12" |
82 | | - ColumnSpacing="12"> |
83 | | - <Grid.ColumnDefinitions> |
84 | | - <ColumnDefinition Width="Auto" /> |
85 | | - <ColumnDefinition Width="*" /> |
86 | | - </Grid.ColumnDefinitions> |
87 | | - <TextBlock VerticalAlignment="Center" Text="{helpers:ResourceString Name=ChooseToolbarModeToCustomize}" /> |
88 | | - <uc:ComboBoxEx |
89 | | - Grid.Column="1" |
90 | | - MinWidth="220" |
91 | | - AutomationProperties.Name="{helpers:ResourceString Name=ChooseToolbarModeToCustomize}" |
92 | | - DisplayMemberPath="Value" |
93 | | - ItemsSource="{x:Bind ViewModel.ToolbarContexts, Mode=OneWay}" |
94 | | - SelectedValue="{x:Bind ViewModel.SelectedToolbarContextId, Mode=TwoWay}" |
95 | | - SelectedValuePath="Key" /> |
| 79 | + <Grid Grid.Row="1" Padding="16,12"> |
| 80 | + <StackPanel |
| 81 | + x:Name="ContextPickerPanel" |
| 82 | + Orientation="Horizontal" |
| 83 | + Spacing="12"> |
| 84 | + <TextBlock |
| 85 | + x:Name="ToolbarModeLabel" |
| 86 | + VerticalAlignment="Center" |
| 87 | + Text="{helpers:ResourceString Name=ChooseToolbarModeToCustomize}" |
| 88 | + TextWrapping="WrapWholeWords" /> |
| 89 | + <uc:ComboBoxEx |
| 90 | + x:Name="ToolbarModeComboBox" |
| 91 | + Width="240" |
| 92 | + HorizontalAlignment="Left" |
| 93 | + AutomationProperties.Name="{helpers:ResourceString Name=ChooseToolbarModeToCustomize}" |
| 94 | + DisplayMemberPath="Value" |
| 95 | + ItemsSource="{x:Bind ViewModel.ToolbarContexts, Mode=OneWay}" |
| 96 | + SelectedValue="{x:Bind ViewModel.SelectedToolbarContextId, Mode=TwoWay}" |
| 97 | + SelectedValuePath="Key" /> |
| 98 | + </StackPanel> |
96 | 99 | </Grid> |
97 | 100 |
|
98 | 101 | <!-- Available and Added items --> |
|
346 | 349 | Content="{helpers:ResourceString Name=Cancel}" /> |
347 | 350 | </StackPanel> |
348 | 351 | </Grid> |
| 352 | + <VisualStateManager.VisualStateGroups> |
| 353 | + <VisualStateGroup> |
| 354 | + <VisualState x:Name="DefaultContextPickerState"> |
| 355 | + <VisualState.StateTriggers> |
| 356 | + <AdaptiveTrigger MinWindowWidth="640" /> |
| 357 | + </VisualState.StateTriggers> |
| 358 | + <VisualState.Setters> |
| 359 | + <Setter Target="ContextPickerPanel.Orientation" Value="Horizontal" /> |
| 360 | + <Setter Target="ContextPickerPanel.Spacing" Value="12" /> |
| 361 | + </VisualState.Setters> |
| 362 | + </VisualState> |
| 363 | + <VisualState x:Name="CompactContextPickerState"> |
| 364 | + <VisualState.StateTriggers> |
| 365 | + <AdaptiveTrigger MinWindowWidth="0" /> |
| 366 | + </VisualState.StateTriggers> |
| 367 | + <VisualState.Setters> |
| 368 | + <Setter Target="ContextPickerPanel.Orientation" Value="Vertical" /> |
| 369 | + <Setter Target="ContextPickerPanel.Spacing" Value="8" /> |
| 370 | + </VisualState.Setters> |
| 371 | + </VisualState> |
| 372 | + </VisualStateGroup> |
| 373 | + </VisualStateManager.VisualStateGroups> |
349 | 374 | </Grid> |
350 | 375 | </Page> |
0 commit comments