|
97 | 97 | <Thickness x:Key="SettingsCardBorderThickness">1</Thickness> |
98 | 98 | <Thickness x:Key="SettingsCardPadding">16,16,16,16</Thickness> |
99 | 99 | <Thickness x:Key="SettingsCardIconMargin">2,0,20,0</Thickness> |
100 | | - <x:Double x:Key="SettingsCardMaxWidth">1000</x:Double> |
101 | | - <x:Double x:Key="SettingsCardMinWidth">360</x:Double> |
| 100 | + <x:Double x:Key="SettingsCardMinWidth">148</x:Double> |
102 | 101 | <x:Double x:Key="SettingsCardMinHeight">68</x:Double> |
103 | 102 | <x:Double x:Key="SettingsCardActionButtonWidth">32</x:Double> |
104 | 103 | <x:Double x:Key="SettingsCardActionButtonHeight">32</x:Double> |
|
110 | 109 | <Thickness x:Key="SettingsCardHeaderIconMargin">2,0,20,0</Thickness> |
111 | 110 | <Thickness x:Key="SettingsCardVerticalHeaderContentSpacing">0,4,0,0</Thickness> |
112 | 111 | <x:Double x:Key="SettingsCardWrapThreshold">460</x:Double> |
| 112 | + <x:Double x:Key="SettingsCardWrapNoIconThreshold">286</x:Double> |
113 | 113 |
|
114 | 114 | <Style BasedOn="{StaticResource DefaultSettingsCardStyle}" |
115 | 115 | TargetType="labs:SettingsCard" /> |
|
125 | 125 | <Setter Property="MinHeight" Value="{ThemeResource SettingsCardMinHeight}" /> |
126 | 126 | <!--<Setter Property="win:AutomationProperties.AutomationControlType" Value="Group" />--> |
127 | 127 | <!--<Setter Property="win:AutomationProperties.Name" Value="{TemplateBinding Header}" />--> |
128 | | - <Setter Property="MaxWidth" Value="{ThemeResource SettingsCardMaxWidth}" /> |
129 | 128 | <Setter Property="MinWidth" Value="{ThemeResource SettingsCardMinWidth}" /> |
130 | 129 | <Setter Property="IsTabStop" Value="False" /> |
131 | 130 | <Setter Property="HorizontalAlignment" Value="Stretch" /> |
|
313 | 312 | </VisualState> |
314 | 313 | <VisualState x:Name="RightWrapped"> |
315 | 314 | <VisualState.StateTriggers> |
316 | | - <labs:ControlSizeTrigger MaxWidth="{ThemeResource SettingsCardWrapThreshold}" |
| 315 | + <labs:ControlSizeTrigger MinWidth="{ThemeResource SettingsCardWrapNoIconThreshold}" |
| 316 | + MaxWidth="{ThemeResource SettingsCardWrapThreshold}" |
317 | 317 | TargetElement="{Binding ElementName=PART_RootGrid}" /> |
318 | 318 | </VisualState.StateTriggers> |
319 | 319 | <VisualState.Setters> |
|
324 | 324 | <Setter Target="PART_ContentPresenter.Margin" Value="{ThemeResource SettingsCardVerticalHeaderContentSpacing}" /> |
325 | 325 | </VisualState.Setters> |
326 | 326 | </VisualState> |
| 327 | + <VisualState x:Name="RightWrappedNoIcon"> |
| 328 | + <VisualState.StateTriggers> |
| 329 | + <labs:ControlSizeTrigger MaxWidth="{ThemeResource SettingsCardWrapNoIconThreshold}" |
| 330 | + TargetElement="{Binding ElementName=PART_RootGrid}" /> |
| 331 | + </VisualState.StateTriggers> |
| 332 | + <VisualState.Setters> |
| 333 | + <Setter Target="PART_HeaderIconPresenterHolder.Visibility" Value="Collapsed" /> |
| 334 | + <Setter Target="PART_ContentPresenter.(Grid.Row)" Value="1" /> |
| 335 | + <Setter Target="PART_ContentPresenter.(Grid.Column)" Value="1" /> |
| 336 | + <Setter Target="PART_ContentPresenter.HorizontalAlignment" Value="Stretch" /> |
| 337 | + <Setter Target="PART_ContentPresenter.HorizontalContentAlignment" Value="Left" /> |
| 338 | + <Setter Target="PART_ContentPresenter.Margin" Value="{ThemeResource SettingsCardVerticalHeaderContentSpacing}" /> |
| 339 | + </VisualState.Setters> |
| 340 | + </VisualState> |
327 | 341 | <VisualState x:Name="Vertical"> |
328 | 342 | <VisualState.StateTriggers> |
329 | 343 | <labs:IsEqualStateTrigger Value="{Binding ContentAlignment, RelativeSource={RelativeSource TemplatedParent}}" |
|
0 commit comments