Reputation: 125
I've been stuck now for several days because I can't find a way to bind CollectionViewSource to SemanticZoom control (Windows 10 app).
I made it do far that data is shown in the ZoomedIn view. But I just don't know what else to try to bind groups to ZoomedOut view. It simply doesn't work. I even made a dummy converter to see what kind of data gets to the data template. But It's kind of useless since it is 'DependencyObject' and I can't even cast it to my object.
Can anyone please help me?
P.S. One additional info: I'm styling my SemanticZoom control in a separate ResourceDictionary and It looks like this:
<GridView.ItemTemplate>
<DataTemplate>
<Border Height="48"
Width="144"
Background="Green"
BorderThickness="1">
<ToolTipService.ToolTip>
<TextBox Text="{Binding Converter={StaticResource DoNothing}}"
TextWrapping="Wrap"/>
</ToolTipService.ToolTip>
<TextBlock Text="{Binding Converter={StaticResource DoNothing}}"
Foreground="Yellow"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</DataTemplate>
</GridView.ItemTemplate>
Upvotes: 1
Views: 333
Reputation: 6142
There is a nice example on the GitHub of Microsoft UWP examples.
The given page where it is being used: https://github.com/Microsoft/Windows-universal-samples/blob/5c66da8b7552ad8c3bd665cfad595c7d0bb47059/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/SemanticZoomPage.xaml
The project you need to download to test drive it: https://github.com/Microsoft/Windows-universal-samples/tree/5c66da8b7552ad8c3bd665cfad595c7d0bb47059/Samples/XamlUIBasics
Take a look and try to track in your code what is going wrong.
Upvotes: 1