Update Popup Content On Runtime #654
-
Hello friends, I would like to update the content of the popup dynamically in runtime. For example, I'm showing the text: "Saving..." and then after a few seconds I would like to show the text: "Thank you for submission!" I tried by updating the popup.Content or even by generating a new Popup object without luck. Do you know if this is possible somehow? I don't want to hide and popup and show another popup just for the thanks message. Any hint is always welcome. Thanks in advance :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found the answer myself! I need to update the content directly on the Content not overwriting it as I was trying to do it.
Community.Toolkit.Popups.and.Lottie.movThanks to this I am now able to set perfect loading animations for my application using Lottie. See attached video. thanks everybody for your help and this amazing library! |
Beta Was this translation helpful? Give feedback.
I found the answer myself! I need to update the content directly on the Content not overwriting it as I was trying to do it.
if (popup.Content is VerticalStackLayout) { // Update the message var layout = (VerticalStackLayout)popup.Content; if (layout.Children.Count > 1 && layout.Children[1] is Label) ((Label)layout.Children[1]).Text = message; }
Community.Toolkit.Popups.and.Lottie.mov
Thanks to this I am now able to set perfect loading animations for my application using Lottie. See attached video.
thanks everybody for your help and this amazing library!