|
|
|
@ -7,16 +7,35 @@ |
|
|
|
namespace Perspex.Controls |
|
|
|
{ |
|
|
|
using Perspex.Controls.Primitives; |
|
|
|
using Perspex.Layout; |
|
|
|
|
|
|
|
public class ContentControl : TemplatedControl |
|
|
|
{ |
|
|
|
public static readonly PerspexProperty<object> ContentProperty = |
|
|
|
PerspexProperty.Register<ContentControl, object>("Content"); |
|
|
|
|
|
|
|
public static readonly PerspexProperty<HorizontalAlignment> HorizontalContentAlignmentProperty = |
|
|
|
PerspexProperty.Register<ContentControl, HorizontalAlignment>("HorizontalContentAlignment"); |
|
|
|
|
|
|
|
public static readonly PerspexProperty<VerticalAlignment> VerticalContentAlignmentProperty = |
|
|
|
PerspexProperty.Register<ContentControl, VerticalAlignment>("VerticalContentAlignment"); |
|
|
|
|
|
|
|
public object Content |
|
|
|
{ |
|
|
|
get { return this.GetValue(ContentProperty); } |
|
|
|
set { this.SetValue(ContentProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
public HorizontalAlignment HorizontalContentAlignment |
|
|
|
{ |
|
|
|
get { return this.GetValue(HorizontalContentAlignmentProperty); } |
|
|
|
set { this.SetValue(HorizontalContentAlignmentProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
public VerticalAlignment VerticalContentAlignment |
|
|
|
{ |
|
|
|
get { return this.GetValue(VerticalContentAlignmentProperty); } |
|
|
|
set { this.SetValue(VerticalContentAlignmentProperty, value); } |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|