Willie007

Hi,

i load a Border control on a canvas,

in this border control i place a Grid control.

the size of the grid is larger than the border control.

What i want is that the grid shows only the part that can be made visible,

but instead the grid is resized to fit the border control, and all columns are resized so that the content is no longer auto sized for each column to fit the content

is it possible to tell the grid to create a grid (size) based on the content and not on the container where it is positioned into

Thanks,


Willie



Re: Windows Presentation Foundation (WPF) Place grid inside border problem

-SerialSeb-

The layout mode in WPF is always dependent on the container. Maybe you don't choose the proper container If you want an element to resize without bounds, you want to contain it in a canvas or a scrollviewer. With the ScrollViewer, the content will be clipped automatically based on the ScrollViewer size or container, and let you change what is viewable eiher with the scrollbars (if visible) or programatically. With the canvas, it'll somply be clipped based on the canvas size.





Re: Windows Presentation Foundation (WPF) Place grid inside border problem

Willie007

I was afraid of that....

Thanks, i will have a look at the canvas and scrollviewer...