tags:

views:

121

answers:

2

Hi,

I need to create ListBox with WrapPanel ItemsTemplate.

My item is displayed as a card with small top "toolbar" that is displaying dynamically on mouse over.

[ dyn. toolbar ] [ card ]

Everything is running well except the first line.

I need to have cards very close each other. Hence the Height of the item is set to height of the card without toolbar height. Toolbar is created with Margin.Top < 0.

The problem is that toolbar is clipped by listbox.

Do you know some technique how to solve this situation?

Thanks to all!

+1  A: 

I'm not sure I fully understand your question, but if you're displaying the toolbar above the card using a negative top margin, couldn't you compensate for this by dynamically setting a positive margin on the card whenever the toolbar is shown?

Ben
A: 

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

Bryan Anderson