Loading a Label from XAML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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