我正在使用 electron.Net,但是当我启动主窗口时,它总是打开与中心对齐的小尺寸。
这是我的代码:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
if (env.IsDevelopment()) {
app.UseDeveloperExceptionPage();
} else {
app.UseExceptionHandler("/Home/Error");
}
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints => {
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
});
Task.Run(async () => await Electron.WindowManager.CreateWindowAsync());
Electron.Menu.SetApplicationMenu(new MenuItem[] {});
}