Skip to content

Commit

Permalink
Refactor App initialization to use CreateWindow method
Browse files Browse the repository at this point in the history
Modified the App constructor to remove direct initialization of MainPage with AppShell. Added a new CreateWindow method that overrides the base class method to create and return a new Window object initialized with AppShell. This change improves the structure and initialization process of the application.
  • Loading branch information
IeuanWalker committed Nov 19, 2024
1 parent 70ab069 commit 5a47f85
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Demo/App/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ public partial class App : Application
public App()
{
InitializeComponent();

MainPage = new AppShell();
}
protected override Window CreateWindow(IActivationState? activationState) => new(new AppShell());
}

0 comments on commit 5a47f85

Please sign in to comment.