-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.xaml.cs
More file actions
27 lines (23 loc) · 730 Bytes
/
Copy pathApp.xaml.cs
File metadata and controls
27 lines (23 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using Microsoft.Extensions.DependencyInjection;
namespace DiskPartUI;
public partial class App : Application
{
private readonly IServiceProvider _services;
public App(IServiceProvider services)
{
InitializeComponent();
_services = services;
}
protected override Window CreateWindow(IActivationState? activationState)
{
//Single-page app: use MainPage directly as the window content (no Shell),
//so there is no Shell navigation/title bar above our own header.
var page = _services.GetRequiredService<MainPage>();
return new Window(page)
{
Title = "DiskPart UI",
Width = 1280,
Height = 1000,
};
}
}