I have a class called ledgerObject :
public class LedgerObject
{
public ChargeLine ChargeLine{ get; set; }
public DelegateCommand Click_hyperbnCommand{ get; private set; }
public LedgerObject()
{
this.Click_hyperbnCommand = new DelegateCommand(click_btn);
}
private void click_btn(object args)
{
}
}
The chargeLine which is the property of this class is itself a class and has some properties in it.
So I am binding the datacontext of a listbox to an array of LedgerObject, and I want to bind the textblock control defined inside a listboxitem template to the property of a ChargeLine. Any idea or suggestion will help.
I have tried this but not working:
<TextBlock Margin="4 0 4 0" Grid.Column="3" Text="{Binding Path=ChargeLine.SimCode}" TextDecorations="Underline" Foreground="Red" />