Hi,
I am having two DataTemplates one for Header and one for Content. The Content part is working properly, but the Header part is not showing the value. Can anyone please look into the sample code and help out?
I have attached the sample.
Thanks
Prasad
Actually the Template for Header is shown, but the value that is binded to the textblock with in the header template is not getting displayed.
Any suggestions please.
Any help please...
Hi Prasad,
Thank you for your feedback. This could help other community members as well.
Thank you Maria.
This helps me.
Hello Prasad,
You can use a RelativeSource binding to access the EmpNo property for a tile. The below code snippet illustrates the approach:<DataTemplate x:Key="EmpTileHeaderTemplate" > <StackPanel Orientation="Horizontal"> <TextBlock Text="EmpNo: " /> <TextBlock Text="{Binding Path=DataContext.EmpNo, RelativeSource={RelativeSource AncestorType={x:Type ig:XamTile}}}" TextAlignment="Left" FontWeight="Bold" FontSize="16" Foreground="DarkRed"/> </StackPanel> </DataTemplate>
Please feel free to let me know whether it helps.