Skip to content

Commit

Permalink
Merge branch 'main' into file-scoped-namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
nmetulev authored Dec 19, 2024
2 parents b5ff3ab + 907e6b9 commit f576cbb
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 37 deletions.
45 changes: 22 additions & 23 deletions AIDevGallery/ProjectGenerator/Template/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,31 @@
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.

namespace $safeprojectname$
namespace $safeprojectname$;

/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public partial class App : Application
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public partial class App : Application
public App()
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
}

/// <summary>
/// Invoked when the application is launched.
/// </summary>
/// <param name="args">Details about the launch request and process.</param>
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
Window = new MainWindow();
Window.Activate();
}
this.InitializeComponent();
}

internal static MainWindow? Window { get; private set; }
/// <summary>
/// Invoked when the application is launched.
/// </summary>
/// <param name="args">Details about the launch request and process.</param>
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
Window = new MainWindow();
Window.Activate();
}
}

internal static MainWindow? Window { get; private set; }
}
27 changes: 13 additions & 14 deletions AIDevGallery/ProjectGenerator/Template/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
using Microsoft.UI.Xaml;

namespace $safeprojectname$
namespace $safeprojectname$;

public sealed partial class MainWindow : Window
{
public sealed partial class MainWindow : Window
public MainWindow()
{
public MainWindow()
this.InitializeComponent();
this.RootFrame.Loaded += (sender, args) =>
{
this.InitializeComponent();
this.RootFrame.Loaded += (sender, args) =>
{
RootFrame.Navigate(typeof($MainSamplePage$));
};
}
RootFrame.Navigate(typeof($MainSamplePage$));
};
}

internal void ModelLoaded()
{
ProgressRingGrid.Visibility = Visibility.Collapsed;
}
internal void ModelLoaded()
{
ProgressRingGrid.Visibility = Visibility.Collapsed;
}
}
}

0 comments on commit f576cbb

Please sign in to comment.