Im trying to create a WPF UserControl that contains an image docked to the left side, and a 2 column table on the right. I want the control to automatically resize so that it is tall enough to contain the contents of the table (a grid panel with 2 columns, 3 rows).
The control will resize correctly with just the grid, but once I add the image on the left hand side, things stop working. I have it kind of working - but the issue is that the control seems to always resize the height of the control based on the size of the image, rather than the size of the grid (the picture is currently taller than the grid).
If my image is 50 wide x 100 tall, and the grid is sized to be 50 tall...I ultimately want the image to be 'stretched' down to 25x50 to match the grid. If the grid is 75 tall, I want the image to be 37x75, etc. And then have the user control match the height of the grid and image.
Any thoughts on what my layout should look like to accomplish this? I've tried all sorts of combinations of width, heights, alignments, etc, but cant seem to get the image to resize correctly so that it matches the height of the grid (based on grid contents - # of rows, font size, etc).
Not sure if I need to put a grid inside of a grid, or some other layout. Right now I have a dockpanel with an image docked to the left, and the grid fills the remaining space.
Any help would be appreciated.