.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,084 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I am building a .net maui application my .png's show up on android and android emulators
But I am unable to get the same image on windows build, or any image for that matter of fact
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
}
};