Пример #1
0
        public static TWidget BuildContainer <TWidget>(this IWidgetBuilder builder, IWidget content) where TWidget : ContainerWidget
        {
            var widget = builder.Build <TWidget>();

            widget.Content = content;
            return(widget);
        }
Пример #2
0
        public static TextWidget BuildText(this IWidgetBuilder builder, string text, Color color)
        {
            var widget = builder.Build <TextWidget>();

            widget.Text      = text;
            widget.FontColor = color;
            return(widget);
        }
Пример #3
0
        public static TextWidget BuildText(this IWidgetBuilder builder, string text)
        {
            var widget = builder.Build <TextWidget>();

            widget.Text      = text;
            widget.FontColor = Color.FromArgb(36, 41, 46);
            return(widget);
        }
Пример #4
0
        public static BoxWidget BuildBox(this IWidgetBuilder builder, float margin, Border border, float padding)
        {
            var widget = builder.Build <BoxWidget>();

            widget.Margin  = new Edges <float>(margin);
            widget.Border  = new Edges <Border>(border);
            widget.Padding = new Edges <float>(padding);
            return(widget);
        }