sanjeev1988
sanjeev1988

Reputation: 13

How to use Custom Renderer in Xamarin Shared Project

I am using Shared Project for my cross platform mobile application and want to use Custom renderer in my app for native support. Is there any way i can use Custom renderer in my app.

Upvotes: 1

Views: 658

Answers (2)

Kamalkumar.E
Kamalkumar.E

Reputation: 254

For Xamarin shared base project we have to set local in xmlns below format

xmlns:local="clr-namespace:Sampleforms"

For Xamarin PCL base project we have to set local in xmlns below format

xmlns:local="clr-namespace:Sampleforms;assembly=Sampleforms"

Reming everything will be same as what do for custom render.

Upvotes: 1

Demitrian
Demitrian

Reputation: 3230

There is no difference in-between using custom renders in a PCL or Shared Project as seen here. You still have a project per platform. That doesn't change. The real advantage is that you can use ifdefs when compared to PCLs.

here is all the information you'll need in regards to implementing custom renders. And here is an example of a custom renderer for an Entry.

Upvotes: 2

Related Questions