Hello
Im using Infragistics for WPF 12.2.20122.2202
Very simple scenario: I have a view and want to have XamGrid that is not stretched to the parent container - instead - it should be vertically alignment to the top.
The problem is that, whatever I set for the VerticalAlignment, the content seems to be always stretched
(how I know this, well - if there are many columns, the HorizontalScrollBar appears on the very bottom. Instead - it should appear just under the last row within a grid).
Is there any way to achieve this?
Hi,
The most straight-forward approach is to give the grid a specific height.
There isn't any specific property but if you put the xamGrid in a stackpanel you can use the VerticalAlignment of Top and the grid will only use the vertical space it needs and the horizontal scrollbar will follow immediately at the bottom of the last row. The drawback is that the vertical scrolling is lost because the grid has no idea how much vertical space is required. And if you have a lot of rows they may be clipped off. That's caused by putting the control in a stackpanel. So you may still need to give the grid a specific height.
Let me know if either of these options helps you.
I was wondering if my suggestions resolved your question. Please let me know if you have further questions.