|
108 | 108 | <ControlTemplate TargetType="{x:Type controls:CardExpander}"> |
109 | 109 | <ControlTemplate.Resources> |
110 | 110 | <converters:AnimationFactorToValueConverter x:Key="AnimationFactorToValueConverter" /> |
| 111 | + <converters:CornerRadiusSplitConverter x:Key="CornerRadiusSplitConverter" /> |
111 | 112 | </ControlTemplate.Resources> |
112 | 113 |
|
113 | 114 | <Grid> |
|
122 | 123 | Grid.Row="0" |
123 | 124 | Background="{TemplateBinding Background}" |
124 | 125 | BorderBrush="{TemplateBinding BorderBrush}" |
125 | | - BorderThickness="1" |
126 | | - CornerRadius="{TemplateBinding CornerRadius}"> |
| 126 | + BorderThickness="1"> |
| 127 | + <Border.CornerRadius> |
| 128 | + <MultiBinding Converter="{StaticResource CornerRadiusSplitConverter}" ConverterParameter="Top"> |
| 129 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="CornerRadius" /> |
| 130 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="IsExpanded" /> |
| 131 | + </MultiBinding> |
| 132 | + </Border.CornerRadius> |
127 | 133 | <ToggleButton |
128 | 134 | x:Name="ExpanderToggleButton" |
129 | 135 | Margin="0" |
|
173 | 179 | Background="{DynamicResource CardBackground}" |
174 | 180 | BorderBrush="{TemplateBinding BorderBrush}" |
175 | 181 | BorderThickness="1,0,1,1" |
176 | | - CornerRadius="0,0,4,4" |
177 | 182 | Visibility="Collapsed"> |
| 183 | + <Border.CornerRadius> |
| 184 | + <MultiBinding Converter="{StaticResource CornerRadiusSplitConverter}" ConverterParameter="Bottom" > |
| 185 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="CornerRadius" /> |
| 186 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="IsExpanded" /> |
| 187 | + </MultiBinding> |
| 188 | + </Border.CornerRadius> |
178 | 189 | <ContentPresenter |
179 | 190 | x:Name="ContentPresenter" |
180 | 191 | Margin="{TemplateBinding ContentPadding}" |
|
197 | 208 | <ControlTemplate.Triggers> |
198 | 209 | <Trigger Property="IsExpanded" Value="True"> |
199 | 210 | <!-- TODO: Update --> |
200 | | - <Setter TargetName="ToggleButtonBorder" Property="CornerRadius" Value="4,4,0,0" /> |
201 | 211 | <Trigger.EnterActions> |
202 | 212 | <BeginStoryboard> |
203 | 213 | <Storyboard> |
|
0 commit comments