Unwanted cropping in WrapPanel

I need to create a ListBox using WrapPanel ItemsTemplate.

My item displays as a map with a small top toolbar that is dynamically displayed on the mouse.

[dyn. toolbar] [card]

Everything works well except for the first line.

I need to have the cards very close to each other. Hence the Element Height is set to the map height without the panel height. The toolbar was created with Margin.Top <0.

The problem is the toolbar is being clipped by the list.

Do you know any methods for dealing with this situation?

Thanks everyone!

0


source to share


2 answers


I'm not sure I fully understand your question, but if you are showing the toolbar above the map with a negative top margin, could you compensate for that by dynamically setting a positive margin on the map whenever the toolbar is displayed?



+1


source


Xaml will be helpful. One rule of thumb I've found is to never set the actual height or width properties of a control. Try to take out the height property and that should get rid of the clipping. You should be able to get whatever spacing you want with Margin, Padding or MinHeight.



0


source







All Articles