tags:

views:

24

answers:

1

For the purposes of this question, I have a list box that uses wrap panel as its ItemsPanel, this list box is filled with 200x200 images, when a user's mouse hovers over a box, I scale the render transform by 2x. The problem is the content of the image gets clipped by the images below it, how can I override the Z-Order to the image to prevent this from happening?

+1  A: 

Use a Trigger on your item containers !

<ListBox>
    <ListBox.ItemContainerStyle>
        <Style TargetType="{x:Type ListBoxItem}">
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Panel.ZIndex" Value="10" />
                </Trigger>
            </Style.Triggers>
        </Style>
    </ListBox.ItemContainerStyle>
</ListBox>
Aurélien Ribon