Reputation: 53
I have a problem with Pivot
control. How can I insert xaml page with content to Pivot
item? Is it even possible?
When I’m storing everything in one file it’s really hard to take control over my own application layout.
I want something like this:
Upvotes: 0
Views: 2275
Reputation: 9230
Add correct namespace to Page:
xmlns:view="clr-namespace:YourApp.Controls"
and in Pivot:
<Pivot>
<PivotItem Name="first">
<view:FirstUserControl DataContext="{Binding YourViewModel}"/>
</PivotItem>
</Pivot>
And in view namespace you need to create a User Control. The link is about WPF but in WP7 there is the same system.
Also, you can create Custom Control from PivotItem.
Upvotes: 1