Reputation: 1921
As a title for the Panorama, I use a custom UserControl that I'd like to update from the PhoneApplicationPage. But to do so, I need to access it, I tryed to get the children of the Panorama:
Grid grid = VisualTreeHelper.GetChild(panorama, 0) as Grid;
But it says that panorama has 0 Children. Is it normal? Do you know a way to access a Panorama.TitleTemplate ?
Thanks!
Upvotes: 0
Views: 495
Reputation: 26347
What prevents you from doing this?
<controls:Panorama Title="{Binding}">
<controls:Panorama.TitleTemplate>
<DataTemplate>
<local:MyUserControl DataContext="{Binding}" />
</DataTemplate>
</controls:Panorama.TitleTemplate>
...
</controls:Panorama>
Upvotes: 1