-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update .NET MAUI app to .NET 9 (#581)
* Update project to .NET 9.0 and various code improvements 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. * Refactor App initialization and update dependencies 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. * Update network settings for Android and iOS - 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`. * Add Basket.API project to ClientApp solution 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. * not needed * Fix XamlC warnings in .NET MAUI app (#585) * Add missing x:DataType * Reenable warnings * Update some styles * Update src/HybridApp/App.xaml.cs Co-authored-by: Eilon Lipton <[email protected]> * Use source-generated JSON serialization in .NET MAUI app (#587) * Use source-generated JSON serialization in ClientApp * Refactor serialization of JSON content * Add ConfigureHandlers method for iOS and Mac Catalyst 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. * Remove Grid.ColumnSpan="0" from <Image> in LoginView.xaml 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. * Refactor LoginView.xaml layout and clean up code - 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. --------- Co-authored-by: Šimon Rozsíval <[email protected]> Co-authored-by: Eilon Lipton <[email protected]> Co-authored-by: James Montemagno <[email protected]>
- Loading branch information
1 parent
842dfc0
commit 5401748
Showing
30 changed files
with
245 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Text.Json.Serialization; | ||
using eShop.ClientApp.Models.Catalog; | ||
using eShop.ClientApp.Models.Orders; | ||
using eShop.ClientApp.Models.Token; | ||
|
||
namespace eShop.ClientApp.Services; | ||
|
||
[JsonSourceGenerationOptions( | ||
PropertyNameCaseInsensitive = true, | ||
NumberHandling = JsonNumberHandling.AllowReadingFromString)] | ||
[JsonSerializable(typeof(CancelOrderCommand))] | ||
[JsonSerializable(typeof(CatalogBrand))] | ||
[JsonSerializable(typeof(CatalogItem))] | ||
[JsonSerializable(typeof(CatalogRoot))] | ||
[JsonSerializable(typeof(CatalogType))] | ||
[JsonSerializable(typeof(Models.Orders.Order))] | ||
[JsonSerializable(typeof(Models.Location.Location))] | ||
[JsonSerializable(typeof(UserToken))] | ||
internal partial class EShopJsonSerializerContext : JsonSerializerContext | ||
{ | ||
} |
Oops, something went wrong.