- ago
Hello community,

i would like to know how to resize a childwindow when its initialized.
while i can fit my usercontrol nicely into the parent, it seems not possible to resize the parent window programmatically without using some sort of hack, like traversing the visual tree.
is there an api method to can set the window size?
using width and height properties will only resize the usercontrol.

Kind regards
Mike
0
267
Solved
4 Replies

Reply

Bookmark

Sort
- ago
#1
Mike,

I may be able to help you, but can you clarify what you are trying to do? I'm a bit confused from your description.

For example, are you creating an extension and getting its ChildWindow and then you want to resize it (I realize it is a UserControl up the class hierarchy), or some UserControl you added to it, or the something in the visual hierarchy related to the ChildWindow (such as the chart)? Or are you doing something else?
0
- ago
#2
Thank you,

Unfortunatley it is not possible to add an image after the post is made though you have the option in the editor, therefore an extra note here.

I want to resize this window. My Usercontrol inherits from ChildWindow.
If its initialized it always has the size of the welcome page.
But i want to resize it to custom dimension.
0
- ago
#3
Try this...

Don't do the resize in Initialize (the override).

ChildWindow has a property named MyMDIChild. Presuming you've created an extension, and then called WLClientHost.Instance.ShowExtensionChildWindow to show it, then set the Width and Height properties of MyMDIChild and call UpdateLayout. See if that does the trick. You can also set MyMDIChild.Title if you want to have a dynamic title.
2
Best Answer
- ago
#4
you are a genious, that did the trick.
i already found out how to stretch my control to fit in the parent window, but the resizing was missing.
i already tried to set the size in the handler but have not called UpdateLayout. :D

0

Reply

Bookmark

Sort