CarouselView: CarouselViewControl not rendered when loading a page from memory

Target control version: 4.2.6

If you create a single instance page that you retrieve with the Autofac library such as: Bootstrapper.Instance.Container.Resolve<SomeKindOfView>() then if that page above contains instances of CarouselViewControl then those will not get rendered with their ItemTemplate or get the Position set on them => they will be blank

If you want to solve this then I recommend the following workaround: create your own CustomCarouselViewRenderer derived from the CarouselViewRenderer and override the OnAttachedToWindow method like so:

protected override void OnAttachedToWindow() { base.OnAttachedToWindow(); if (Control == null) { Element.Layout((Element.Parent as View).Bounds); } }

Let me know if you have questions screenshot_2017-05-23-11-22-51

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 54 (23 by maintainers)

Most upvoted comments

Let me try to add a fix for it.

Do we have any ETA on when this issue would be resolved?