提交 adab001e 编写于 作者: M Martin Zikmund

fix: Raise ImageFailed properly on Android

上级 620c190a
......@@ -146,6 +146,13 @@ namespace Windows.UI.Xaml.Controls
}
}
if (imageSource.ResourceFailed)
{
// Currently resource-based images are evaluated immediately
// in the constructor - so we have to raise ImageFailed late.
OnImageFailed(imageSource, new InvalidOperationException("Resource could not be found"));
}
if (this.Log().IsEnabled(Uno.Foundation.Logging.LogLevel.Debug))
{
this.Log().Debug(this.ToString() + " TryOpenImage - proceeding");
......
......@@ -91,6 +91,8 @@ namespace Windows.UI.Xaml.Media
|| ResourceId != null;
}
internal bool ResourceFailed => ResourceString is not null && ResourceId is null;
internal BitmapDrawable? BitmapDrawable { get; private set; }
internal int? ResourceId
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册