Browse Source

Removed tabs and moved static ctor.

pull/506/head
Steven Kirk 10 years ago
parent
commit
67ff6c474f
  1. 24
      src/Perspex.Controls/Image.cs

24
src/Perspex.Controls/Image.cs

@ -23,7 +23,13 @@ namespace Perspex.Controls
/// </summary>
public static readonly StyledProperty<Stretch> StretchProperty =
PerspexProperty.Register<Image, Stretch>(nameof(Stretch), Stretch.Uniform);
static Image()
{
AffectsRender(SourceProperty);
AffectsRender(StretchProperty);
}
/// <summary>
/// Gets or sets the bitmap image that will be displayed.
/// </summary>
@ -42,17 +48,11 @@ namespace Perspex.Controls
set { SetValue(StretchProperty, value); }
}
static Image()
{
AffectsRender(SourceProperty);
AffectsRender(StretchProperty);
}
/// <summary>
/// Renders the control.
/// </summary>
/// <param name="context">The drawing context.</param>
public override void Render(DrawingContext context)
/// <summary>
/// Renders the control.
/// </summary>
/// <param name="context">The drawing context.</param>
public override void Render(DrawingContext context)
{
var source = Source;

Loading…
Cancel
Save