У меня есть вопрос о привязке данных, с которым я борюсь.
В моем файле xaml.cs есть следующее свойство:
private string _stationIdInstruction;
public event PropertyChangedEventHandler PropertyChanged;
public string StationIdInstruction
{
get { return _stationIdInstruction; }
set
{
_stationIdInstruction = value;
OnPropertyChanged("StationIdInstruction");
}
}
protected void OnPropertyChanged(string name)
{
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(name));
}
}
Как я могу привязать TextBlock к StationIdInstructions, чтобы он выбирал строковое свойство как его Text и обновлял TextBlock.Text при обновлении StationIdInstructions.
Любая помощь приветствуется.