I am using the NorthWind Db to learn WPF, and have a window with several datagrids on it showing the data in various tables from the Db. I have Textblocks above the datagrids showing total records and current selected record.
I have defined them as shown below in my XAML
<TextBlock x:Name="CustCurrent"
Text="{Binding CustomerCurrent, UpdateSourceTrigger=PropertyChanged,RelativeSource={RelativeSource FindAncestor, AncestorType=local:nwcustomer}}"
Height="25"
FontWeight="Bold"
Padding="3"
VerticalAlignment="Center"
Background="Cyan"
Width="390"
Foreground="{StaticResource Black1}"/>
the property Customercurrent is a full property defined in my nwcustomer class as shown here :
public int CustomerCurrent
{
get
{
return customerCurrent;
}
set
{
customerCurrent = value;
OnPropertyChanged ( nameof ( CustomerCurrent ) );
}
}
when debugging, the Set is called as expected, but the Get is never called to fill my TextBlock ??
Any help would be gatefully received ?
