Search code examples
xamarinxamarin.formscustom-renderer

How to use custom renderers


I am creating a custom editor, but am not sure how to use it in xml. I tried reading tutorials online but none really explain what to use as the local variable in the xml.

I tried using xmlns:local="clr-namespace:SocialNetwork.Renderers;assembly=SocialNetwork.Renderers" but it doesn't load and when I type <local:MessageEditor/> there is no Text = or any of those options

The path to the editor is SocialNetwork.Renderers

Custom Editor Code and the path is shown (PCL class)

namespace SocialNetwork.Renderers
{
    public class MessageEditor : Editor
    { 
    }
}

Solution

  • The assembly should simply be SocialNetwork. So use this:

    xmlns:local="clr-namespace:SocialNetwork.Renderers;assembly=SocialNetwork"