SetAlignment() public méthode

public SetAlignment ( Alignment wrapAlign ) : void
wrapAlign Alignment
Résultat void
Exemple #1
0
        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;
        }
Exemple #2
0
        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;
        }
Exemple #3
0
        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;
        }
Exemple #4
0
        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;
        }
Exemple #5
0
        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;
        }