|
214 | 214 |
|
215 | 215 | <Style Selector="DataGridRowGroupHeader"> |
216 | 216 | <Setter Property="Background" Value="{DynamicResource ThemeControlMidHighBrush}" /> |
217 | | - <Setter Property="Height" Value="20" /> |
218 | 217 | <Setter Property="Template"> |
219 | 218 | <ControlTemplate> |
220 | 219 | <DataGridFrozenGrid Name="Root" |
221 | 220 | Background="{TemplateBinding Background}" |
| 221 | + MinHeight="52" |
222 | 222 | ColumnDefinitions="Auto,Auto,Auto,Auto" |
223 | 223 | RowDefinitions="Auto,*,Auto"> |
224 | 224 |
|
|
238 | 238 | </Setter> |
239 | 239 | </Style> |
240 | 240 |
|
241 | | - <Style Selector="DataGridRowGroupHeader /template/ ToggleButton#ExpanderButton"> |
| 241 | + <Style Selector="DataGridRowGroupHeader /template/ ToggleButton#PART_ExpanderButton"> |
| 242 | + <Setter Property="Cursor" Value="Hand" /> |
| 243 | + <Setter Property="Focusable" Value="False" /> |
| 244 | + <Setter Property="CornerRadius" Value="16" /> |
| 245 | + <Setter Property="Width" Value="24" /> |
| 246 | + <Setter Property="Height" Value="24" /> |
| 247 | + <Setter Property="Margin" Value="4,0,0,0" /> |
242 | 248 | <Setter Property="Template"> |
243 | | - <ControlTemplate> |
244 | | - <Border Grid.Column="0" Width="20" Height="20" Background="Transparent" HorizontalAlignment="Center" VerticalAlignment="Center"> |
245 | | - <Path Fill="{TemplateBinding Foreground}" |
246 | | - HorizontalAlignment="Center" |
247 | | - VerticalAlignment="Center" |
248 | | - Data="M 0 2 L 4 6 L 0 10 Z" /> |
249 | | - </Border> |
250 | | - </ControlTemplate> |
| 249 | + <Setter.Value> |
| 250 | + <ControlTemplate> |
| 251 | + <Border Background="Transparent" |
| 252 | + CornerRadius="{TemplateBinding CornerRadius}" |
| 253 | + ClipToBounds="True"> |
| 254 | + <ripple:RippleEffect Name="PART_Ripple" |
| 255 | + RippleFill="{TemplateBinding Foreground, |
| 256 | + Converter={StaticResource BrushRoundConverter}}"> |
| 257 | + <Panel Name="PART_InnerPanel" Width="24" Height="24"> |
| 258 | + <Path Data="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" |
| 259 | + Name="ExpandPath" |
| 260 | + Fill="{TemplateBinding Foreground}" |
| 261 | + Stroke="{TemplateBinding Foreground}" /> |
| 262 | + </Panel> |
| 263 | + </ripple:RippleEffect> |
| 264 | + </Border> |
| 265 | + </ControlTemplate> |
| 266 | + </Setter.Value> |
251 | 267 | </Setter> |
252 | | - </Style> |
253 | 268 |
|
254 | | - <Style Selector="DataGridRowGroupHeader /template/ ToggleButton#ExpanderButton:checked /template/ Path"> |
255 | | - <Setter Property="RenderTransform"> |
256 | | - <RotateTransform Angle="90" /> |
257 | | - </Setter> |
| 269 | + <Style Selector="^:not(.no-transitions) /template/ Panel#PART_InnerPanel"> |
| 270 | + <Setter Property="Transitions"> |
| 271 | + <Transitions> |
| 272 | + <TransformOperationsTransition Duration="0:0:0.25" Property="RenderTransform" Easing="CircularEaseOut" /> |
| 273 | + </Transitions> |
| 274 | + </Setter> |
| 275 | + </Style> |
| 276 | + |
| 277 | + <Style Selector="^ /template/ Panel#PART_InnerPanel"> |
| 278 | + <Setter Property="RenderTransform" Value="rotate(0deg)" /> |
| 279 | + </Style> |
| 280 | + |
| 281 | + <!-- Rotate the arrow to 45 degrees when group expanded --> |
| 282 | + <Style Selector="^:checked /template/ Panel#PART_InnerPanel"> |
| 283 | + <Setter Property="RenderTransform" Value="rotate(45deg)" /> |
| 284 | + </Style> |
258 | 285 | </Style> |
259 | 286 |
|
260 | 287 | <Style Selector="DataGrid"> |
|
0 commit comments