I have a pan control in which I created a header template to add a list picker to it. (Just like the center of people selects social accounts)
<DataTemplate x:Key="PanoramaItemHeaderTemplate">
<ContentPresenter>
<StackPanel Height="129">
<TextBlock Text="{Binding}" FontSize="72" Margin="0,7,0,0" />
<toolkit:ListPicker x:Name="listPick" Margin="0,-21,0,0" BorderThickness="0">
<toolkit:ListPickerItem Content="twitter"></toolkit:ListPickerItem>
</toolkit:ListPicker>
</StackPanel>
</ContentPresenter>
</DataTemplate>
The panoramic control is inside the MainPage.xaml file, and I want to have access to the listpicker from the code behind, in order to be able to populate it, and handle selection events.
I do not know how to do that. I tried adding the x: name property to the list, I do not have access to it in the MainPage code.
Any idea on how to approach this is very welcome, thanks!
source
share