Making ResizableContentControl fit in ListBoxItem width

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 8 years ago by Stephen Starkie
Version: 11.1.0543
Avatar
Hi,

I have a ListBox which has datatemplates for the various things it can contain; one of these uses a ResizableContentControl which I have set to resize vertically. I would like it to only fill the width of the list box but can't seem to make it do so

Stephen.

Comments (1)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Stephen,

If I have this code, it's stretching horizontally ok:
<StackPanel>
    <shared:ResizableContentControl ResizeMode="Vertical">
        <Button>Test</Button>
    </shared:ResizableContentControl>
</StackPanel>
There's nothing in the ResizableContentControl code that should affect normal measurement. It should be measuring the same as a normal ContentControl, unless you resize it manually of course.

Maybe you can try a ListBox.HorizontalContentAlignment setting of Stretch?


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.