Browse Source

Merge pull request #5909 from AvaloniaUI/feature/image-content-attribute

add contentattribute to image.
fixes-data-validation-errors-use-datatemplates
Dan Walmsley 5 years ago
committed by GitHub
parent
commit
e371304cf3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.Controls/Image.cs

2
src/Avalonia.Controls/Image.cs

@ -1,5 +1,6 @@
using Avalonia.Media; using Avalonia.Media;
using Avalonia.Media.Imaging; using Avalonia.Media.Imaging;
using Avalonia.Metadata;
namespace Avalonia.Controls namespace Avalonia.Controls
{ {
@ -37,6 +38,7 @@ namespace Avalonia.Controls
/// <summary> /// <summary>
/// Gets or sets the image that will be displayed. /// Gets or sets the image that will be displayed.
/// </summary> /// </summary>
[Content]
public IImage Source public IImage Source
{ {
get { return GetValue(SourceProperty); } get { return GetValue(SourceProperty); }

Loading…
Cancel
Save