Skip to content

Commit 1dd3007

Browse files
Use updated C# syntax Microsoft.Toolkit.Uwp.UI.Controls.Core/ImageEx/ImageExBase.Source.cs
Co-authored-by: Sergio Pedri <[email protected]>
1 parent 12f5bb4 commit 1dd3007

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Microsoft.Toolkit.Uwp.UI.Controls.Core/ImageEx/ImageExBase.Source.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private void AttachSource(ImageSource source)
8888
{
8989
VisualStateManager.GoToState(this, UnloadedState, true);
9090
}
91-
else if (source is BitmapSource bitmap && bitmap.PixelHeight > 0 && bitmap.PixelWidth > 0)
91+
else if (source is BitmapSource { PixelHeight: > 0, PixelWidth: > 0 })
9292
{
9393
VisualStateManager.GoToState(this, LoadedState, true);
9494
ImageExOpened?.Invoke(this, new ImageExOpenedEventArgs());
@@ -237,4 +237,4 @@ protected virtual Task<ImageSource> ProvideCachedResourceAsync(Uri imageUri, Can
237237
return Task.FromResult((ImageSource)new BitmapImage(imageUri));
238238
}
239239
}
240-
}
240+
}

0 commit comments

Comments
 (0)