Skip to content

Commit fa90415

Browse files
Added Requested Changes.
1 parent 09f5fff commit fa90415

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/Controls/src/Core/Handlers/Shell/ShellHandler.Windows.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public static void MapFlyoutBackground(ShellHandler handler, Shell view)
129129
view.FlyoutBackgroundColor?.AsPaint());
130130
}
131131

132+
//TODO: Make it public in .NET 10.
132133
internal static void MapFlyoutBackgroundImage(ShellHandler handler, Shell view)
133134
{
134135
var provider = handler.GetRequiredService<IImageSourceServiceProvider>();

src/Core/src/Platform/Windows/NavigationViewExtensions.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,12 @@ internal static async Task UpdateBackgroundImageSourceAsync(this MauiNavigationV
270270

271271
var service = provider.GetRequiredImageSourceService(imageSource);
272272
var nativeImageSource = await service.GetImageSourceAsync(imageSource);
273+
274+
if (nativeImageSource is null)
275+
{
276+
paneContentGrid.Background = null;
277+
return;
278+
}
273279

274280
var BackgroundImage = new ImageBrush
275281
{

0 commit comments

Comments
 (0)