Merge pull request #774 from yangjieshao/fix_issues_680
修复 ImageViewer.Source 设置为null会报错的问题
This commit is contained in:
@@ -149,6 +149,10 @@ public class ImageViewer: TemplatedControl
|
||||
{
|
||||
if(!IsLoaded) return;
|
||||
IImage image = args.GetNewValue<IImage>();
|
||||
if(image is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Size size = image.Size;
|
||||
double width = this.Bounds.Width;
|
||||
double height = this.Bounds.Height;
|
||||
|
||||
Reference in New Issue
Block a user