A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
740 B

namespace Perspex.Controls
{
using System.Diagnostics.Contracts;
using Perspex.Media;
public class Border : Decorator
{
public static readonly PerspexProperty<Brush> BackgroundProperty =
PerspexProperty.Register<Border, Brush>("Background");
public Brush Background
{
get { return this.GetValue(BackgroundProperty); }
set { this.SetValue(BackgroundProperty, value); }
}
public override void Render(IDrawingContext context)
{
Brush background = this.Background;
if (background != null)
{
context.FillRectange(background, new Rect(this.Bounds.Size));
}
}
}
}