MainWindow.xaml not loading using Application Framework on .NET Core
Posted: 17 May 2019, 16:47
Hi, I am trying to get a console .NET Core app working that starts up Noesis.
I followed your samples and this post: viewtopic.php?f=3&t=1668
I got the following files now:
Program.cs:
App.xaml.cs:
MainWindow.xaml.cs:
My problem is that the MainWindow constructor never gets hits. A window opens, but the screen is completely black.
The last thing that works is the app.Run(); after that my app is dead. No more breakpoints get hit.
All my XAML are on embedded now.
The App.xaml and the MainWindow.xaml are the empty stubs from the sample, the namespaces and class names have been checked like 100 times.
I am using the newest NuGets, no problems with dependencies as far as I can tell.
Does anyone have any clue why this could be happening?
Thank you!
I followed your samples and this post: viewtopic.php?f=3&t=1668
I got the following files now:
Program.cs:
Code: Select all
namespace Dashboard
{
class Program
{
static App app;
public static void Main(string[] args)
{
app = new App() { Uri = "App.xaml", StartupUri = "MainWindow.xaml" };
app.Run();
}
}
}
Code: Select all
using NoesisApp;
namespace Dashboard
{
public partial class App : Application
{
public App()
{
}
protected override Display CreateDisplay()
{
return new Win32Display();
}
protected override RenderContext CreateRenderContext()
{
return new RenderContextD3D11();
}
}
}
Code: Select all
namespace Dashboard
{
public class MainWindow : NoesisApp.Window
{
public MainWindow()
{
}
}
The last thing that works is the app.Run(); after that my app is dead. No more breakpoints get hit.
All my XAML are on embedded now.
The App.xaml and the MainWindow.xaml are the empty stubs from the sample, the namespaces and class names have been checked like 100 times.
I am using the newest NuGets, no problems with dependencies as far as I can tell.
Does anyone have any clue why this could be happening?
Thank you!