|
1 | | -<!-- 移植自 https://github.com/CommunityToolkit/Windows/blob/main/components/SettingsControls/src/SettingsExpander/SettingsExpander.xaml --> |
| 1 | +<!-- 移植自 https://github.com/CommunityToolkit/Windows/blob/efbaf965029806fe29e02a6421af3c8f434e1460/components/SettingsControls/src/SettingsExpander/SettingsExpander.xaml --> |
2 | 2 | <!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> |
3 | 3 | <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
15 | 15 | <x:Double x:Key="SettingsExpanderChevronButtonWidth">32</x:Double> |
16 | 16 | <x:Double x:Key="SettingsExpanderChevronButtonHeight">32</x:Double> |
17 | 17 |
|
| 18 | + <local:SettingsExpanderCornerRadiusConverter x:Key="SettingsExpanderCornerRadiusConverter" /> |
| 19 | + |
18 | 20 | <Style x:Key="DefaultSettingsExpanderItemStyle" |
19 | 21 | BasedOn="{StaticResource DefaultSettingsCardStyle}" |
20 | 22 | TargetType="local:SettingsCard"> |
|
76 | 78 | BorderThickness="0" |
77 | 79 | Content="{TemplateBinding Content}" |
78 | 80 | Description="{TemplateBinding Description}" |
| 81 | + FontFamily="{TemplateBinding FontFamily}" |
79 | 82 | Header="{TemplateBinding Header}" |
80 | 83 | HeaderIcon="{TemplateBinding HeaderIcon}" |
81 | 84 | IsClickEnabled="False" /> |
82 | 85 | </muxc:Expander.Header> |
83 | 86 | <muxc:Expander.Content> |
84 | | - <local:SimpleStackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}"> |
| 87 | + <StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}" |
| 88 | + CornerRadius="{Binding CornerRadius, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource SettingsExpanderCornerRadiusConverter}}"> |
85 | 89 | <ContentPresenter Content="{TemplateBinding ItemsHeader}" /> |
86 | 90 | <!-- ItemsRepeater 无法在 XAML Islands 中使用,见 https://github.com/microsoft/microsoft-ui-xaml/issues/2349 --> |
87 | 91 | <ItemsControl x:Name="PART_ItemsContainer" |
|
90 | 94 | ItemTemplate="{Binding ItemTemplate, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" /> |
91 | 95 | <ContentPresenter Grid.Row="2" |
92 | 96 | Content="{TemplateBinding ItemsFooter}" /> |
93 | | - </local:SimpleStackPanel> |
| 97 | + </StackPanel> |
94 | 98 | </muxc:Expander.Content> |
95 | 99 | </muxc:Expander> |
96 | 100 | </ControlTemplate> |
|
0 commit comments