This is a question relating to Microsoft Surface development, but I think it's more of a general WPF question as well.
How would I translate the following code, which I've found in an example:
<s:ScatterView>
<s:ScatterViewItem Style="{DynamicResource FlippingScatterViewItemStyle}">
// etc.
</s:ScatterViewItem>
</s:ScatterView>
to work with data binding:
<s:ScatterView>
<s:ScatterView.ItemTemplate>
<DataTemplate>
// etc.
</DataTemplate>
</s:ScatterView.ItemTemplate>
</s:ScatterView>
I'm not sure how to "attach" the Style
declaration in the original code.
Apologies if my terminology is not correct, as I am a WPF newbie.
I'm not familiar with the ScatterView control but if it derives from ItemsControl which the ItemTemplate property suggests, then there should be an ItemContainerStyle property as well. The ItemContainerStyle is a style that is applied to the item itself.
<s:ScatterView ItemContainerStyle="{DynamicResource FlippingScatterViewItemStyle}">
<s:ScatterView.ItemTemplate>
<DataTemplate>
// etc.
</DataTemplate>
</s:ScatterView.ItemTemplate>
</s:ScatterView>