Xamarin.Forms UWP exception using Pagerenderer
See original GitHub issue🐛 Bug Report
if i use pagerenderer just like below in uwp, lottie is throwing exception as
at Lottie.Forms.UWP.Renderers.AnimationViewRenderer.<OnElementChanged>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
at System.Threading.WinRTSynchronizationContextBase.Invoker.InvokeCore()
public class ContentPageRenderer : PageRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Page> e)
{
base.OnElementChanged(e);
if (e.OldElement != null || Element == null)
{
return;
}
ContentPage page = ((ContentPage)Element);
if (page.Content == null )
return;
var XboxControls = new MyUserControl1();
StackLayout stackLayout = new StackLayout() { Orientation = StackOrientation.Vertical };
stackLayout.Children.Add(page.Content);
stackLayout.Children.Add(XboxControls.ToView());
page.Content = stackLayout;
}
}
Reproduction steps
- run attached test project in UWP local, you will see that lottie will throw exception.
- remove ContentPagerenderer class and run it again it works.
Version: 1.x 2.7 Platform:
- 📱 iOS
- 🤖 Android
- 🏁 WPF
- [x ] 🌎 UWP
- 🍎 MacOS
- 📺 tvOS
- [x ] 🐒 Xamarin.Forms
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Xamarin.Forms UWP exception using Pagerenderer #211
Bug Report if i use pagerenderer just like below in uwp, lottie is throwing exception as at Lottie.Forms.UWP.Renderers.
Read more >Xamarin Forms UWP PageRenderer
There is always a Exception thrown: 'System.InvalidOperationException' in Xamarin.Forms.Platform.UAP.dll error during the build.
Read more >Customizing a ContentPage - Xamarin
Forms application, in iOS the PageRenderer class is instantiated, ... On the Universal Windows Platform (UWP), the PageRenderer class ...
Read more >Xamarin.Forms 3.0.0 Service Release 2
To make it easier to support right-to-left languages in Xamarin.Forms, we have ... Github #2633 - "Exception at Xamarin.Forms.Platform.UWP.
Read more >Xamarin.Forms Basic Document Viewer
It is important that you understand how Xamarin renders the same page on different platforms using ContentPage , ExportRenderer and PageRenderer . In...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It has been superseded by a native Microsoft official version. We need to update LottieXamarin to use this new version. https://github.com/windows-toolkit/Lottie-Windows
@sohchatt @azchohfi i’m happy to take PR’s for the update.