There is a view of the model wpf page. It indicates the property:
string totalST; public string totalStproperty { get { return totalST; } set { totalST = value; } } In the class constructor, the value is passed to the property for the first time:
totalST = "Всего студентов " + allS.Rows.Count.ToString(); And in the markup, the property is bound to:
<Label x:Name="allStudents" Content="{Binding totalStproperty, Mode=TwoWay}"/> At the first page load, the total number of students will be shown, equal to the rows in the corresponding table. But then we call a command that shows only a part of the students in the table - accordingly, the number in the label should also change:
public RelayCommand<ListBoxItem> SelectFilter { get { return new RelayCommand<ListBoxItem>(DataGridRefresh); } } private void DataGridRefresh(ListBoxItem selected) { totalST= "Всего студентов 0"; } It does not show errors, it is compiled, but it is executed incorrectly. totalST takes the value of "Всего студентов 0" but the old value in the Label hangs as if there was no Binding . Where is the mistake?