This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work]
I have created a sample project and I want to apply background image on the content page
public MainPage()
{
InitializeComponent();
var backgroundImageSource = ImageSource.FromFile("loginbg.png");
// Set the background image
BackgroundImageSource = backgroundImageSource;
}
attached Sample code :
MauiApp3.zip
Original Comments
Feedback Bot on 2/21/2024, 00:15 AM:
(private comment, text removed)
Santosh Kundkar on 3/8/2024, 00:00 AM:
(private comment, text removed)
Original Solutions
Santosh Kundkar solved on 2/20/2024, 11:29 PM, 0 votes:
I have also tried with setting the property on App.xml
like
<Style TargetType=“ContentPage” ApplyToDerivedTypes=“True”>
<Setter Property=“NavigationPage.HasNavigationBar” Value=“False” />
<Setter Property=“BackgroundImageSource” Value=“loginbg.png” />
</Style>
But again this is not working
Issue is only with iOS
This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work]
I have created a sample project and I want to apply background image on the content page
public MainPage()
{
InitializeComponent();
var backgroundImageSource = ImageSource.FromFile("loginbg.png");
// Set the background image
BackgroundImageSource = backgroundImageSource;
}
attached Sample code :
MauiApp3.zip
Original Comments
Feedback Bot on 2/21/2024, 00:15 AM:
(private comment, text removed)
Santosh Kundkar on 3/8/2024, 00:00 AM:
(private comment, text removed)
Original Solutions
Santosh Kundkar solved on 2/20/2024, 11:29 PM, 0 votes:
I have also tried with setting the property on App.xml
like
<Style TargetType=“ContentPage” ApplyToDerivedTypes=“True”>
<Setter Property=“NavigationPage.HasNavigationBar” Value=“False” />
<Setter Property=“BackgroundImageSource” Value=“loginbg.png” />
</Style>
But again this is not working
Issue is only with iOS