/// <summary> /// Builds element for label. /// </summary> /// <param name="properties">information about label</param> /// <param name="skin">defines the look of label</param> /// <returns>label element</returns> private TextBlock buildLabel(AFFieldInfo properties, Skin skin) { TextBlock label = new TextBlock(); if (!String.IsNullOrEmpty(properties.getLabelText())) { String labelText = Localization.translate(properties.getLabelText()); //set label position label.Foreground = new SolidColorBrush(skin.getLabelColor()); label.FontFamily = skin.getLabelFont(); label.FontSize = skin.getLabelFontSize(); label.Text = labelText; label.TextWrapping = TextWrapping.Wrap; return label; } return null; }