public static TWidget BuildContainer <TWidget>(this IWidgetBuilder builder, IWidget content) where TWidget : ContainerWidget { var widget = builder.Build <TWidget>(); widget.Content = content; return(widget); }
public static TextWidget BuildText(this IWidgetBuilder builder, string text, Color color) { var widget = builder.Build <TextWidget>(); widget.Text = text; widget.FontColor = color; return(widget); }
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); }
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); }