Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

How to get ViewRenderer for a ViewCell

$
0
0

I Have the following Control:

public class FooViewCell : ViewCell

And the Renderer:

public class FooViewCellRenderer : ViewCellRenderer
{
        public override System.Windows.DataTemplate GetTemplate(Cell cell)
        {
            return System.Windows.Application.Current.Resources["FooViewCell"] as System.Windows.DataTemplate;
        }
}

And I also have an CustomListViewRenderer and need to get the ViewCellRenderer from the ViewCell, although the ViewCell it´s not a visual element, so the view.GetRenderer method does not work, and the View property (from viewCell) is null.

OBS: The component work fine, I am only have trouble to get the ViewCell renderer, in my CustomListViewRenderer.

Thanks in advanced


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>