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

Renderers in Separate projects not working?

$
0
0

(PCL, XForm 1.3.1)

We have many apps. To handle this we have a common project for IOS and a common project for Android apps. See Screenshot.

If we put a Renderer in the Common IOS project, it is ignored. If we move the renderer to the main project it works.

How do we register a renderer so that it will work from a common project that all our apps can share?

[assembly: ExportRenderer(typeof(CleanListView), typeof(CleanListViewRenderer))]

namespace Common.IOS.Renderers
{
   public class CleanListViewRenderer :ListViewRenderer
    {
       protected override void OnElementChanged(ElementChangedEventArgs<ListView> e)
       {
           base.OnElementChanged(e);

           var tableView = Control as UITableView;
           if (tableView != null) tableView.SeparatorStyle = UITableViewCellSeparatorStyle.None;
       }
    }
}

Viewing all articles
Browse latest Browse all 77050

Trending Articles



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