Browse Source

Added Padding to TemplatedControl.

pull/39/head
Steven Kirk 11 years ago
parent
commit
5bcd8ecd91
  1. 9
      Perspex.Controls/Primitives/TemplatedControl.cs

9
Perspex.Controls/Primitives/TemplatedControl.cs

@ -38,6 +38,9 @@ namespace Perspex.Controls.Primitives
public static readonly PerspexProperty<Brush> ForegroundProperty =
TextBlock.ForegroundProperty.AddOwner<TemplatedControl>();
public static readonly PerspexProperty<Thickness> PaddingProperty =
Decorator.PaddingProperty.AddOwner<TemplatedControl>();
public static readonly PerspexProperty<ControlTemplate> TemplateProperty =
PerspexProperty.Register<TemplatedControl, ControlTemplate>("Template");
@ -95,6 +98,12 @@ namespace Perspex.Controls.Primitives
set { this.SetValue(ForegroundProperty, value); }
}
public Thickness Padding
{
get { return this.GetValue(PaddingProperty); }
set { this.SetValue(PaddingProperty, value); }
}
public ControlTemplate Template
{
get { return this.GetValue(TemplateProperty); }

Loading…
Cancel
Save