-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update .NET MAUI app to .NET 9 #581
Conversation
Updated App.xaml.cs to override CreateWindow and adjust SetStatusBar. Targeted .NET 9.0 in ClientApp.csproj and updated packages. Removed XML declarations from Styles.xaml and view files. Handled end group tags in Basket.cs protobuf parsing. Changed DisplayAlert usage in DialogService.cs. Modified TitleUseAzureServices property in SettingsViewModel.cs. Updated ClientApp.UnitTests.csproj with newer package versions.
Updated App.xaml.cs to use CreateWindow method for main window initialization. Repositioned ManagePackageVersionsCentrally in HybridApp.csproj. Updated SupportedOSPlatformVersion for iOS and MacCatalyst to 15.0. Upgraded PackageReference versions to 9.0.0-rc.2. Reformatted Routes.razor and _Imports.razor for consistency.
- MainPage.xaml: Added XML namespace `local` for `eShop.HybridApp.Components`. - MauiProgram.cs: Updated `MobileBffHost` URL for Android to `http://10.0.2.2:11632/` and kept `http://localhost:11632/` for other platforms. - AndroidManifest.xml: Enabled cleartext traffic and added network security config. - Info.plist: Relaxed network security policies to allow HTTP connections. - network_security_config.xml: Created to permit cleartext traffic for `10.0.2.2`.
Added Basket.API project to ClientApp.sln with GUID {0F0B89AF-EDEA-4479-941A-CCE9FFDBD057}. Updated solution configuration platforms to include build and active configuration settings for Debug and Release configurations.
* Add missing x:DataType * Reenable warnings
@@ -86,7 +90,7 @@ private void App_RequestedThemeChanged(object sender, AppThemeChangedEventArgs e | |||
|
|||
private void SetStatusBar() | |||
{ | |||
var nav = Current.MainPage as NavigationPage; | |||
var nav = Windows[0].Page as NavigationPage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jfversluis thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep that is unfortunately what it is for now. Alternatively since you're using Shell you could do Shell.Current.CurrentPage
which is a tiny bit nicer? But also I think that might be going away at some point since it's also not great.
@jfversluis can you pull this and take a look as to why teh fontawesome icons aren't loading.... |
Co-authored-by: Eilon Lipton <[email protected]>
* Use source-generated JSON serialization in ClientApp * Refactor serialization of JSON content
The MauiProgram class has been updated to include a new method ConfigureHandlers. This method is conditionally compiled for iOS and Mac Catalyst platforms and adds custom handlers for CollectionView and CarouselView controls. The ConfigureHandlers method is called in the CreateMauiApp method to ensure these handlers are configured during the app's initialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I focused my review on the HybridApp, which I'm most familiar with, and I think it's good. I scanned through the ClientApp but only quickly and didn't find any issues.
Tested on iOS, macOS and Android and it shows the icons there, so maybe just a fluke? |
I do see a couple of
and one
In the debug output, but can't really pinpoint where its coming from. Does that ring a bell? |
Removed the Grid.ColumnSpan="0" attribute from the <Image> element in LoginView.xaml. This attribute was likely incorrect or unnecessary, and its removal may correct the layout behavior of the image within the grid.
was able to fix up the column span thing... nto srue about the "6" that is weird It has to be somethign on the login page... if i delete
the warnings go away |
- Added `LoginPanel` grid with specific properties and bindings. - Introduced a new logo image element for better visual structure. - Reformatted and re-added the login button with necessary properties. - Removed commented-out `<ScrollView>`, `<ContentView>`, and register button. - Enhanced code readability by eliminating unused commented code.
PR Classification
Code cleanup and upgrade to .NET 9.0.
PR Summary
This pull request updates the project to target .NET 9.0, includes code cleanup, and updates package references.
App.xaml.cs
: OverriddenCreateWindow
method to return a newWindow
instance withAppShell
and updatedSetStatusBar
method.ClientApp.csproj
andHybridApp.csproj
: Target .NET 9.0 and updated package references.Basket.cs
: Improved protobuf parsing by handling end group tags.DialogService.cs
: Updated to useAppShell.Current.DisplayAlert
instead ofApplication.Current.MainPage.DisplayAlert
.SettingsViewModel.cs
: MadeTitleUseAzureServices
property non-static.