Skip to content

Conversation

mattleibow
Copy link
Member

@mattleibow mattleibow commented Jun 11, 2021

Description of Change

This PR adds the ability for the use of the MainPage property on Application to specify the page, rather than creating a new window which as of yet has no special features.

@mattleibow mattleibow changed the title WIP to get MainPage working Add back support for using MainPage instead of CreateWindow Jun 11, 2021
@mattleibow mattleibow requested review from PureWeen and Redth June 11, 2021 22:13
@mattleibow mattleibow changed the base branch from release/6.0.1xx-preview5 to main June 19, 2021 00:34
# Conflicts:
#	src/Compatibility/Core/src/AppHostBuilderExtensions.Controls.cs
#	src/Core/src/Platform/Windows/MauiWinUIApplication.cs
Debug.WriteLine($"The .NET Purple color is {Resources["DotNetPurple"]}");
Debug.WriteLine($"The injected text service had a message: '{textService.GetText()}'");

MainPage = Services.GetRequiredService<Page>();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use MainPage for single page apps.

(TestWindow)(this as IApplication).CreateWindow(null);

protected override IWindow CreateWindow(IActivationState activationState)
protected override Window CreateWindow(IActivationState activationState)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Windows property is now a list of Control's Window as that is probably what we want at this level.

Comment on lines +11 to +16
// Events called by the Application
public delegate void OnApplicationCreating(Application application);
public delegate void OnApplicationCreate(Application application);
public delegate void OnApplicationLowMemory(Application application);
public delegate void OnApplicationTrimMemory(Application application, TrimMemory level);
public delegate void OnApplicationConfigurationChanged(Application application, Configuration newConfig);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some new application events.

@PureWeen PureWeen merged commit 3143ba3 into main Jun 22, 2021
@PureWeen PureWeen deleted the dev/mainpage branch June 22, 2021 20:42
@samhouts samhouts added the area-templates Project templates, Item Templates for Blazor and MAUI label Jul 20, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
@samhouts samhouts added the fixed-in-6.0.100-preview.6 Look for this fix in 6.0.100-preview.6! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-templates Project templates, Item Templates for Blazor and MAUI fixed-in-6.0.100-preview.6 Look for this fix in 6.0.100-preview.6!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants