Sources to learn beyond basic skills of custom renderers

BenjaminTooleBenjaminToole USMember ✭✭✭

What are some sources to learn beyond basic handling of custom renderers in xamarin forms projects? I've been looking for a while and a lot of the tutorials I find only show how to implement beginning procedures.


  • JohnHardmanJohnHardman GBUniversity mod
    edited November 2017

    @BenjaminToole - What do you consider "basic" handling of custom renderers, and what are you hoping to do that is beyond "basic"?

    If you have access to Xamarin University, the custom renderer class XAM335 is running tomorrow morning (3AM UK time). It's worth doing, although you might want to find a more convenient time for whichever timezone you are in :-)

  • BenjaminTooleBenjaminToole USMember ✭✭✭

    For instance a basic tutorial shows how to set up a custom renderer, then maybe change the text color or add a border but nothing beyond that. I'm looking for more in depth customization tutorials, like adding additional set of text to a UIButton, or adding a placeholder that auto resizes. I know that xamarin forms was not made with the intention of doing customization, but Im just reaching out to see if I hit the barrier of its capabilities (which I don't think I have).

  • JohnHardmanJohnHardman GBUniversity mod

    @BenjaminToole - Where customising a subclass of Xamarin.Forms.View, other than ContentView, you may be constrained when trying to tweak functionality of views that make use of classes that have members that are private or internal. Yes, you can work around that by using reflection, but there is the risk that a future XF release might break the work around. Otherwise, you can do pretty much anything supported by the underlying operating system.

    In the case of the auto-resizing placeholder that you mentioned, as long as the bits you need to tweak are not private or internal to another class, you should be able to do that (I make use of an Effect to reduce Text font size to fit into space available, so I would expect placeholder to be similar).

    In the case of adding additional text to a UIButton, if you mean above or below the button, the approach you mentioned in another thread seems more appropriate than creating a custom ButtonRenderer.

  • JulienRosenJulienRosen CAMember ✭✭✭✭
    edited November 2017

    custom renderers are meant to tweak the existing properties/behaviors of controls on their native platform that may not be accessible from PCL.

    wanting to add new (as in not available natively) functionality to a control falls more under designing a custom control then a renderer

Sign In or Register to comment.