I'm targeting Windows Phone 8 and I would like to access my StackPanel
named ListHeaderStackPanel which resides in a LongListSelector
DataTemplate
. My code looks as follows
<DataTemplate x:Key="ListHeader">
<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10,0,0">
<StackPanel x:Name="ListHeaderStackPanel" HorizontalAlignment="Left" Height="8" VerticalAlignment="Top" Width="8">
</StackPanel>
</Grid>
</DataTemplate>
Is this possible? I've tried using FindName
without luck and simply using ListHeaderStackPanel from code will not work.