This is a migrated thread and some comments may be shown as answers.

Cannot centre window, even when parent is set

1 Answer 126 Views
Window
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 22 Aug 2010, 10:38 AM
I am unable to centre a child dialog window of type RadWindow. I create the window as following:

NewGoalWindow view = new NewGoalWindow();
view.WindowStartupLocation = WindowStartupLocation.CenterOwner;
view.Owner = WindowHelper.MainWindow;
NewGoalViewModel model = new NewGoalViewModel();
model.RequestClose += delegate
{
  view.Close();
};
view.DataContext = model;
view.ShowDialog();

The window is always located in the top left corder. WindowHelper.MainWindow is a reference to a RadWindow, which I have checked is the main window of the application.

I need help. Am I overlooking something?

1 Answer, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 25 Aug 2010, 11:17 PM
This has been resolved. I think there was a theme that I had applied that messed up the positioning of windows.
Tags
Window
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or