Hi,
I am experiencing an issue with the xamDialogWindow being resized when it does not fit inside the browser window. The IsResizable property is set to false however this is being ignored. Also the xamDialogWindow will not resize back to it's original size when the size of the browser window is increased.
I was able to overcome this issue by setting the MinHeight and MinWidth properties however another issue has appeared as a result. When I minimise the xamDiaglogWindow it ignores the MinimisedHeight/Width properties and remains the same size as defined in the MinHeight and MinWidth properties.
I would like to prevent the xamDialogWindow from being resized while at the same time being able to use the MinimisedHeight/Width properties.
Any suggestions on how to overcome these issues?
Thanks
Hello,
Thank you for your post. I have been reading through it and if I understand correctly, the issue is that the XamDialogWindow is changing its size when the browser is resized and the control should go out of view. I have been researching this and could not managed to reproduce it. I have added a XamDialogWindow to a Silverlight application and when resize the browser the XamDialogWindow is not visible and its size remain the same. I have created a video that shows the behavior that I am getting and also attached the sample application that I have used.
Please let me know if you can reproduce the issue with my sample application and if I have misunderstood you in any way.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hi Krasimir,
Thanks for the reply. It appears that the issue only occurs when the "RestrictInContrainer" property of the xamDialogWindow is set to true. I have executed your solution with the "RestrictInContainer" property set to true and the xamDialog window resizes.
We have had to set "RestrictInContainer" to true to overcome another issue: https://www.infragistics.com/community/forums/f/retired-products-and-controls/66353/silverlight-v5-error
Any suggestions?
The documentation for "RestrictInContainer" indicates that the xamDialogWindow "cannot be resized larger that its container". It does not indicate that the "IsResizable" property will be ignored and that the xamDialogWindow will shrink if it no longer fits in it's container.
As stated in my original post, I am already using the MinWidth and MinHeight properties however using these properties causes the MinimisedHeight and MinimisedWidth properties to be ignored.
In my xamDialogWindow I have set the following properties:
By setting the properties above I am able to overcome the issue of the xamDialogWindow from resizing (shrinking) when it does not fit in its container, however the MinimisedHeight and MinimisedWidth properties are being ignored. This means that when I try to minimise the xamDialogWindow it remains the same height and width as set in the MinHeight and MinWidth properites.
So to summarise, at present I can either:
or
I hope this helps explain the issue i am having.
Thank you for your reply and the detailed information. The is resized property is actually not ignored in the scenario that you are having. When set to false, this property does not restrict the XamDialogWindow to not change its size, but does not allow the end user to change the width and the height of the control, by dragging its border. You can refer to the following article that describes this property: https://help.infragistics.com/Doc/Silverlight/2012/1/CLR4.0/?page=InfragisticsSL5.Controls.Interactions.XamDialogWindow.v12.1~Infragistics.Controls.Interactions.XamDialogWindow~IsResizable.html. I have investigated how you can achieve the functionality that you have described and I have modify the sample application that I have sent you previously in order to implement it. I have removed the MinWidth and MinHeight properties of the XamDialogWindow and handled the SizeChanged event. In the event handler, I am returning the previous size, if the new is smaller than the previous. This way the XamDialogWindow cannot become smaller. I have also handled the WindowStateChanging event, in which, if the new state is Minimized, Maximized or Hidden, I am removing the event handler for the SizeChanged event in order to allow the control to change its size. Also I am handling the WindowStateChanged event, where I am adding the handler for the SizeChanged event, again if the new state is normal.
If you need any further assistance on the matter, please do not hesitate to ask.
I am just checking if you require any further assistance on the matter.
Thanks Krasimir. I have successfully implemented your solution.
I had hoped to resolve the issue without the need to implement a fix in code-behind, however this ow appears to be unavoidable.
Thank you for your feedback. I am very glad that the approach I have suggested helped soling your issue. If you need any further assistance on the matter, please let me know.