From 5bcd8ecd91d1df8d422470c09650ec82c0e1a619 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sat, 28 Feb 2015 21:36:53 +0100 Subject: [PATCH] Added Padding to TemplatedControl. --- Perspex.Controls/Primitives/TemplatedControl.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Perspex.Controls/Primitives/TemplatedControl.cs b/Perspex.Controls/Primitives/TemplatedControl.cs index 0b4ab5bda9..2ddfe4b815 100644 --- a/Perspex.Controls/Primitives/TemplatedControl.cs +++ b/Perspex.Controls/Primitives/TemplatedControl.cs @@ -38,6 +38,9 @@ namespace Perspex.Controls.Primitives public static readonly PerspexProperty ForegroundProperty = TextBlock.ForegroundProperty.AddOwner(); + public static readonly PerspexProperty PaddingProperty = + Decorator.PaddingProperty.AddOwner(); + public static readonly PerspexProperty TemplateProperty = PerspexProperty.Register("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); }