Hi,
I have a xamDataGrid placed inside a user control. I do not set the width and height properties as I would like to conform to the width and height of the user control's container. I.e when the user resizes the window, the xamDataGrid should resize as well. If I do this, scrollbars do not appear and if set a width and height then I get a scrollbar but the xamDataGrid does not resize when the window is resized. Is there are workaround to this.
Ihsan
Hello Ihsan,
Can you please give us the markup for your window (where the user control is) and the markup of your usercontrol?
Hi Alex,
Thank you for your quick response. I have however solved this issue. Instead of using a stackpanel I use a grid. That seems to do the trick.. I don't know why though..
That is why I asked for your layout. The StackPanel measures its child controls with infinite height/width depending on its orientation. In your setup, you probably had a StackPanel with Vertical Orientation. Thus, the StackPanel measures its children with infinite height, so that is why the XamDataGrid does not have a scrollbar - it will be given as much space as it needs to display all of its content.