WPF User Control not stretching/aligning properly in ViewAndLayoutItem

The main Grid in the user control isn’t stretching properly. Also, when I apply horizonal+vertical stretch on something, it gets even smaller compared to when I use VerticalAlignment=“Top”.

How do I properly stretch a whole User Control to a view slot?

I did an experiment. I made a new plugin with the template.

When looking at the view item the header label is always top left. I made a second label which I placed in the right hand side and bottom of the user control and then modified Vertical Alignment to bottom and Horizontal Alignment to right.

This most simple of layouts works, when I expand the size of the control by changing or maximizing, the label is alway bottom-right, and the original header is top-left.

There are many properties when laying out the WPF User Control, so I hope you can figure something out.

Otherwise, do you have a very simple example, where you think it does not work as supposed to work, that you can share?

I gave up on WPF, so I’m using a standard user control now.

I didn’t figure out how to make the user control dock within the viewAndLayoutItem layout rectangle. When I used stretch on everything, it was still just centered withing the rect. If I used vertical+horizontal stretch on a control, it wasn’t stretched at all. It was just very odd behaviour in my experience, so to save time, I switched over to Winforms again.