Skip to content

Instantly share code, notes, and snippets.

@jfversluis
Last active February 13, 2018 18:03
Embed
What would you like to do?
Loading a Label from XAML
using Xamarin.Forms.Xaml;
//...
int loadCounter = 0;
var labelXaml = $"<Label Text=\"I was loaded from a string {++loadCounter} times!\" VerticalOptions=\"Center\" HorizontalOptions=\"Center\" />";
var label = new Label();
label.LoadFromXaml(labelXaml);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment