Jaa


Preventing TiltEffect on a WP7 ListBox item

I had some trouble disabling the TiltEffect on items inside a particular WP7 ListBox in my application.  I tried setting the SuppressTilt and the IsTiltEnabled properties on the ListBox as well as the StackPanel inside my DataTemplate and the ItemsPanelTemplate but all that failed to prevent the TiltEffect on each item in the ListBox.  If you have trouble as well, I found that setting the IsHitTestVisible on the ItemsPanelTemplate's StackPanel to false. This prevents the container from receiving ANY touch input thus solving my issue.

<ListBox>

<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel IsHitTestVisible ="False" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>

<ListBox.ItemTemplate>
<DataTemplate>
                              ….
</DataTemplate>
</ListBox.ItemTemplate>

</ListBox>