Select to view content in your preferred language

ProWindow parent

473
1
09-06-2019 01:18 PM
serbanmarin1
Emerging Contributor

I found that using the default constructor for a ProWindow will generate an object that has its Parent field null. This means using WindowStartupLocation on that object has no effect and the following code doesn't work

var wnd = new ProWindow();
wnd.WindowStartupLocation = WindowStartupLocation.CenterScreen;
wnd.Show();

Is there a way to create a ProWindow object that does have a reference to its parent? Is there an alternative to force WindowStartupLocation?

0 Kudos
1 Reply
GKmieliauskas
Esri Regular Contributor

Hi Serban,

I do it in that way. My ProWindow Class:

public partial class TestWindow : ProWindow

Creating new window:

var testWindow = new TestWindow();

testWindow.Owner = FrameworkApplication.Current.MainWindow;

testWindow.ShowDialog();