Is there any way to create a resizable childwindow in silverlight 3? Any pointers are highly appreciated.
I don't have any actual code for you, but you would probably want to subclass ChildWindow and handle the MouseLeftButtonDown, MouseMove, and MouseLeftButtonUp mouse events within a certain "border" of the edge of the ChildWindow or within a certain "grip" region (such as the lower-right corner).
You would want to use some standard drag and drop logic to detect that a drag is being performed for a resize and update this.Width
and this.Height
based on the relative mouse coordinates using the GetPosition()
method of the MouseEventArgs class.
You might also want to have a look at the FloatableWindow control on CodePlex, which is a refactored version of the ChildWindow which supports drag and drop moving and resizing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With