mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-20 08:26:35 +08:00
38 lines
1.8 KiB
XML
38 lines
1.8 KiB
XML
<Styles
|
|
x:Class="Semi.Avalonia.SemiPopupAnimations"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:semi="https://irihi.tech/semi">
|
|
<Style Selector="Popup LayoutTransformControl#PART_LayoutTransform">
|
|
<Setter Property="RenderTransformOrigin" Value="{Binding $parent[Popup].Placement, Converter={semi:PlacementToRenderTransformOriginConverter}}" />
|
|
</Style>
|
|
|
|
<Style Selector="Popup[IsOpen=True] LayoutTransformControl#PART_LayoutTransform">
|
|
<Style.Animations>
|
|
<Animation Duration="0:0:0.1" FillMode="Forward" Easing="CubicEaseIn">
|
|
<KeyFrame Cue="0.0">
|
|
<Setter Property="ScaleTransform.ScaleX" Value="0.98" />
|
|
<Setter Property="ScaleTransform.ScaleY" Value="0.98" />
|
|
</KeyFrame>
|
|
<KeyFrame Cue="1.0">
|
|
<Setter Property="ScaleTransform.ScaleX" Value="1.0" />
|
|
<Setter Property="ScaleTransform.ScaleY" Value="1.0" />
|
|
</KeyFrame>
|
|
</Animation>
|
|
</Style.Animations>
|
|
</Style>
|
|
<Style Selector="Popup[IsOpen=False] LayoutTransformControl#PART_LayoutTransform">
|
|
<Style.Animations>
|
|
<Animation Duration="0:0:0.1" FillMode="Forward" Easing="CubicEaseOut">
|
|
<KeyFrame Cue="0.0">
|
|
<Setter Property="ScaleTransform.ScaleX" Value="1.0" />
|
|
<Setter Property="ScaleTransform.ScaleY" Value="1.0" />
|
|
</KeyFrame>
|
|
<KeyFrame Cue="1.0">
|
|
<Setter Property="ScaleTransform.ScaleX" Value="0.98" />
|
|
<Setter Property="ScaleTransform.ScaleY" Value="0.98" />
|
|
</KeyFrame>
|
|
</Animation>
|
|
</Style.Animations>
|
|
</Style>
|
|
</Styles> |