PopUp Animation UWP


PopUp Animation UWP



I have a popup that opens with animation and closes with animation, with the property IsLightDismissEnabled set to true, this allows the popup to close even with a click outside of it. But if I click repeatedly on the btnPopUp, the pop up closes and opens in an always different position.



Is possible solve this so that the animation remains - PaneThemeTransition Edge = "Top" - because I would like the animation to scroll when it opens and the same when it closes.



MainPage.xaml:


<Grid x:Name="RootGrid" Width="500" Height="40">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>
<Popup x:Name="PopUpPanel" IsLightDismissEnabled="True" RenderTransformOrigin="0.5,0.5" >
<Popup.ChildTransitions>
<TransitionCollection>
<PaneThemeTransition Edge="Top"/>
</TransitionCollection>
</Popup.ChildTransitions>
<Grid x:Name="PopUpGrid" Margin="0" Height="350" Width="460" VerticalAlignment="Bottom" HorizontalAlignment="Center" Background="#FF2D9319"/>
</Popup>
<Button x:Name="btnPopUp" Grid.Column="1" Click="btnPopUp_Click" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
</Grid>



MainPage.xaml.cs:


private void btnPopUp_Click(object sender, RoutedEventArgs e)
{
PopUpPanel.IsOpen = true;
}



Always thanks in advance!





Thank you for reporting this issue, we are investigating it
– Franklin Chen - MSFT
2 days ago









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to input without newline? (Python)

C++ thread error: no type named ‘type’ MINGW

Analog for TagView in flutter