I like your solution better. The following below "almost" worked but since I did not specify a size on the window directly, the width was too "narrow". Explicitly setting a size on the window and then using CenterParent did the trick.
RadWindow window = new RadWindow()
{
};
Page p = new Page();
window.Content = p;
window.WindowStartupLocation =
WindowStartupLocation.CenterParent;
window.Header =
"RadWindow";
window.Top = 0;
window.Left =0;
window.LeftOffset = 0;
window.TopOffset =0;
p.SizeChanged +=
new SizeChangedEventHandler(mySizeChange);
window.ShowDialog();
.....
private
void mySizeChange(object o, SizeChangedEventArgs e)
{
int i = 0;
if (e.PreviousSize == new Size(0, 0))
{
Page p = o as Page;
RadWindow w = p.Parent as RadWindow;
w.Height = e.NewSize.Height;
w.Width = e.NewSize.Width;
}
}