Images show up on other devices but not windows build

anandarus allen 0 Reputation points
2025-04-25T18:25:52.6066667+00:00

Hi,

I am building a .net maui application my .png's show up on android and android emulatorsScreenshot_20250425_131642

But I am unable to get the same image on windows build, or any image for that matter of fact

Screenshot-2

Here is the code that use.

 var  var image = new Image()
 {
     Source = source,
     Aspect = Aspect.Fill,
     WidthRequest = 100,
     HeightRequest = 100,    
     VerticalOptions = LayoutOptions.Center
     
 };
 AbsoluteLayout.SetLayoutBounds(image, new Rect(0, 0, 1, 1));
 AbsoluteLayout.SetLayoutFlags(image, AbsoluteLayoutFlags.All);
 // Button 1
 var playButton = new ImageButton
 {
     Source = "MainMenuBts/play.png",
     BackgroundColor = Colors.Transparent,
     WidthRequest = scaleImages.Scaling(),
     HeightRequest = scaleImages.Scaling(),
 };
 AbsoluteLayout.SetLayoutBounds(playButton, new Rect(posA, posA1, playButton.WidthRequest, playButton.HeightRequest));
 AbsoluteLayout.SetLayoutFlags(playButton, AbsoluteLayoutFlags.PositionProportional);
 Content = new AbsoluteLayout
 {
     Children =
     {
         image,
         title,
         playButton
     }
 };

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,084 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.