IronEater
IronEater

Reputation: 25

How to open a dialog after the mainWindow shows in Avalonia?

I want to open a dialog after mainWindow, but get error "Cannot show window with non-visible owner."

Then I got after InitializeComponent(); the mainWindow is still loading.

When will the mainWindow finishe the process, where can I put the code to open a dialog?

Upvotes: 0

Views: 594

Answers (1)

Tarazed
Tarazed

Reputation: 2675

Add an event listener for the Window.Loaded event and place your dialog code in that listener.

Upvotes: 0

Related Questions