Hello @arunkumar.mr, It is due to the set properties are called. Try the following code.
public sealed partial class MainWindow : Window, INotifyPropertyChanged
{
public MainWindow()
{
this.InitializeComponent();
}
private string _customer;
public string Customer
{
get => _customer;
set
{
_customer = value;
NotifyPropertyChanged(nameof(Customer));
{
_address = "Customer Address";
_tax = "Customer Tax";
NotifyPropertyChanged(nameof(Address));
NotifyPropertyChanged(nameof(Tax));
}
}
}
private string _address;
public string Address
{
get => _address;
set
{
_address = value;
NotifyPropertyChanged(nameof(Address));
_tax = "Address Tax";
NotifyPropertyChanged(nameof(Tax));
}
}
private string _tax;
public string Tax
{
get => _tax;
set
{
_tax = value;
NotifyPropertyChanged(nameof(Tax));
Debug.WriteLine("\n\nTrigger API call\n\n");
}
}
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}