public TextButton(string text, TextButtonStyle style) { Style = style; _label = new Label(text, new LabelStyle(style.Font, style.FontColor)); _label.SetAlignment(Alignment.Center); Add(_label).Configure.Expand().Fill(); Width = PrefWidth; Height = PrefHeight; }
public CheckBox(string text, CheckBoxStyle style) : base(text, style) { ClearChildren(); Add(_image = new Image(style.CheckboxOff)); Add(Label); Label.SetAlignment(Alignment.Left); Width = PrefWidth; Height = PrefHeight; IsToggle = true; }
public ImageTextButton(string text, ImageTextButtonStyle style) : base(style) { _style = style; Defaults().Configure.Space(3); _image = new Image(); _image.Scaling = Scaling.Fit; Add(_image); _label = new Label(text, new LabelStyle(style.Font, style.FontColor)); _label.SetAlignment(Alignment.Center); Add(_label); Width = PrefWidth; Height = PrefHeight; }