/// <summary> /// This functions create a new label xamarin element. /// </summary> /// <param name="_sources">{Type=ZASources}</param> /// <returns></returns> private static Label ToLabel(this ZASources _sources) { return(new Label() { Text = _sources.Text, TextColor = _sources.TextColor, BackgroundColor = _sources.BackgroundColor, FontSize = _sources.CustomFontSize > 0 ? _sources.CustomFontSize : (double)_sources.FontSize, HorizontalOptions = _sources.HorizontalOptions, VerticalOptions = _sources.VerticalOptions, HorizontalTextAlignment = _sources.HorizontalTextAlignment, VerticalTextAlignment = _sources.VerticalTextAlignment }); }
/// <summary> /// This functions create a new entry xamarin element. /// </summary> /// <param name="_sources">{Type=ZASources}</param> /// <returns></returns> private static Entry ToEntry(this ZASources _sources) { var entry = new Entry { Text = _sources.Text, FontSize = _sources.CustomFontSize > 0 ? _sources.CustomFontSize : (double)_sources.FontSize, Placeholder = _sources.Placeholder, WidthRequest = _sources.WidthRequest, HorizontalOptions = _sources.HorizontalOptions, VerticalOptions = _sources.VerticalOptions, Keyboard = _sources.Keyboard }; if (_sources.Behavior != null) { entry.Behaviors.Add(_sources.Behavior); } return(entry); }