1

TimberControls.TimberLabel

Using Xamarin.Forms over the last few months has made me realise that quite often, the standard controls just don’t cut it, so I’ve decided to make some of the controls I have created available on Github & Nuget. The first one I’m adding is TimberLabel, a custom Xamarin.Forms.Label that adds support for padding, rounded corners and, borders on iOS and Android.

How to use

Nuget

Available on NuGet! Install-Package TimberControls.TimberLabel

Repo

 

Either install the Nuget package or download/clone the repository and add the projects from the src folder into the appropriate projects within your solution as references, then use the control in XAML as below, or from C# in your code-behind file (See the example project for a demo):

Special Note for iOS:

Make sure to add [assembly: Preserve( typeof( TimberLabelRenderer ), AllMembers = true )] within your iOS AppDelegate.cs to avoid the renderer being linked out.

Additional properties

PropertyTypeDescription
CornerRadiusintSets the corner radius of the label
BorderWidthintSets the width of the border for the label
BorderColourColorSets the colour of the border for the label
PaddingThicknessSets the padding for the label

Screenshots

timber-label-iostimber-label-android

Chris Howarth

One Comment

  1. Howdy just wanted to give you a brief heads up and let you know a few of the images aren’t loading properly. I’m not sure why but I think its a linking issue. I’ve tried it in two different web browsers and both show the same results.

Leave a Reply

Your email address will not be published. Required fields are marked *