Browse Source
Not sure where I am - went away for 2 weeks and forgot what I was doing. oops.pull/4/head
16 changed files with 183 additions and 93 deletions
@ -0,0 +1,32 @@ |
|||
// -----------------------------------------------------------------------
|
|||
// <copyright file="Border.cs" company="Steven Kirk">
|
|||
// Copyright 2014 MIT Licence. See licence.md for more information.
|
|||
// </copyright>
|
|||
// -----------------------------------------------------------------------
|
|||
|
|||
namespace Perspex.Controls |
|||
{ |
|||
using System; |
|||
using System.Reactive.Linq; |
|||
using Perspex.Media; |
|||
|
|||
public class TestBorder : Decorator |
|||
{ |
|||
public override void Render(IDrawingContext context) |
|||
{ |
|||
Brush background = this.Background; |
|||
Brush borderBrush = this.BorderBrush; |
|||
double borderThickness = this.BorderThickness; |
|||
|
|||
if (background != null) |
|||
{ |
|||
context.FillRectange(background, new Rect(this.Bounds.Size)); |
|||
} |
|||
|
|||
if (borderBrush != null && borderThickness > 0) |
|||
{ |
|||
context.DrawRectange(new Pen(borderBrush, borderThickness), new Rect(this.Bounds.Size)); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
// -----------------------------------------------------------------------
|
|||
// <copyright file="IObservableDescription.cs" company="Steven Kirk">
|
|||
// Copyright 2014 MIT Licence. See licence.md for more information.
|
|||
// </copyright>
|
|||
// -----------------------------------------------------------------------
|
|||
|
|||
namespace Perspex |
|||
{ |
|||
public interface IObservableDescription |
|||
{ |
|||
string Description { get; } |
|||
} |
|||
} |
|||
Loading…
Reference in new issue