Hi I want to bind the value of a textBlock which is inside a DataTemplate the text property of the TextBlock will change runtime according to the file/folder listing. I have written below code but the string empty. My working env is Windows Phone 8 with Visual Studio 2012.
<Grid x:Name="ContentPanel">
<phone:LongListSelector>
<phone:LongListSelector.ListFooterTemplate >
<DataTemplate >
<TextBlock Name="tbfooter" Text="{Binding FooterText, Mode=OneWay}" />
</DataTemplate>
</phone:LongListSelector.ListFooterTemplate>
</phone:LongListSelector>
this textBlock name= tbfooter has to be updated runtime with Footertext value.
Now in my code behind I have defined this property like
private int _footerText;
public int FooterText
{
get
{
return this._footerText;
}
set
{
this._footerText=value
NotifyPropertyChanged("FooterText");
}
}
However the value of teh textBlock tbfooter is null, it is not showing anything it is just null. Can anybody help me out please ?
Edit: I have again updated XAML code here,. I don't follow MVVM here, it is simple windows phone apps. Any help is appreciated.