feat: add ExpandButton

This commit is contained in:
rabbitism
2023-05-07 01:59:04 +08:00
parent 16dc10422c
commit 642fcb3aeb
3 changed files with 53 additions and 2 deletions

View File

@@ -19,4 +19,20 @@
</ControlTemplate>
</Setter>
</ControlTheme>
<ControlTheme x:Key="{x:Type u:PaginationExpandButton}" TargetType="u:PaginationExpandButton">
<Setter Property="Template">
<ControlTemplate TargetType="u:PaginationExpandButton">
<Grid>
<Button Name="button" Content="..." />
<Popup
IsLightDismissEnabled="True"
IsOpen="{Binding #button.IsPointerOver}"
PlacementTarget="button">
<ListBox Background="White" ItemsSource="{TemplateBinding Pages}" />
</Popup>
</Grid>
</ControlTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary>