Пример #1
0
        public static MyButton Create(ButtonTemplate template, string text)
        {
            var b = Create(text);

            b.ButtonTemplate = new ButtonTemplate(template);
            b.ApplyStyle();
            return(b);
        }
Пример #2
0
 public ButtonTemplate(ButtonTemplate template)
 {
     Background      = new ColorScheme(template.Background);
     Foreground      = new ColorScheme(template.Foreground);
     Stroke          = new ColorScheme(template.Stroke);
     RadiusX         = template.RadiusX;
     RadiusY         = template.RadiusY;
     Padding         = new Thickness(template.Padding.Left, template.Padding.Top, template.Padding.Right, template.Padding.Bottom);
     Margin          = new Thickness(template.Margin.Left, template.Margin.Top, template.Margin.Right, template.Margin.Bottom);
     StrokeThickness = template.StrokeThickness;
     FontSize        = template.FontSize;
     TextAligment    = template.TextAligment;
     Width           = template.Width;
 }