-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathExpandContent.xaml
More file actions
52 lines (48 loc) · 2.83 KB
/
Copy pathExpandContent.xaml
File metadata and controls
52 lines (48 loc) · 2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="utf-8"?>
<UserControl
x:Class="Coder.Desktop.App.Controls.ExpandContent"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="using:CommunityToolkit.WinUI"
mc:Ignorable="d">
<Grid x:Name="CollapsiblePanel" Opacity="0" Visibility="Collapsed" MaxHeight="0" toolkit:UIElementExtensions.ClipToBounds="True">
<Grid.RenderTransform>
<TranslateTransform x:Name="SlideTransform" Y="-16"/>
</Grid.RenderTransform>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
<VisualState x:Name="ExpandedState">
<Storyboard x:Name="ExpandSb">
<DoubleAnimation Storyboard.TargetName="CollapsiblePanel"
Storyboard.TargetProperty="MaxHeight"
To="10000" Duration="0:0:0.16" BeginTime="0:0:0.16"
EnableDependentAnimation="True"/>
<DoubleAnimation Storyboard.TargetName="CollapsiblePanel"
Storyboard.TargetProperty="Opacity" BeginTime="0:0:0.16"
To="1" Duration="0:0:0.16"/>
<DoubleAnimation Storyboard.TargetName="SlideTransform"
Storyboard.TargetProperty="Y" BeginTime="0:0:0.16"
To="0" Duration="0:0:0.16"/>
</Storyboard>
</VisualState>
<VisualState x:Name="CollapsedState">
<Storyboard x:Name="CollapseSb"
Completed="{x:Bind CollapseStoryboard_Completed}">
<DoubleAnimation Storyboard.TargetName="CollapsiblePanel"
Storyboard.TargetProperty="MaxHeight"
To="0" Duration="0:0:0.16"
EnableDependentAnimation="True"/>
<DoubleAnimation Storyboard.TargetName="CollapsiblePanel"
Storyboard.TargetProperty="Opacity"
To="0" Duration="0:0:0.16"/>
<DoubleAnimation Storyboard.TargetName="SlideTransform"
Storyboard.TargetProperty="Y"
To="-16" Duration="0:0:0.16"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</UserControl>