I need to the property in the class to update as selecteditems are changed. But when I set a breakpoint for the setter, it's never actually fired. May I ask how do I get around this?
<telerik:RadAutoCompleteBox ....
SelectedItems"{Binding Occurence.Appointment.SelectedAttendees, Mode=TwoWay}"
.../>
CustomAppointment.cs
public BindableCollection<AttendeeSearchDTO> SelectedAttendees
{
get
{
return selectedAttendees;
}
set
{
if (selectedAttendees != value)
{
selectedAttendees = value;
this.OnPropertyChanged(() => this.SelectedAttendees);
}
}
}
I can set a break point for other components such as below, and it fires completely fine.
<TextBox Text="{Binding Occurrence.Appointment.Body, Mode=TwoWay}" />
Try to use ObservableCollection instead of BindableCollection
public ObservableCollection <AttendeeSearchDTO> SelectedAttendees
{
get
{
return selectedAttendees;
}
set
{
if (selectedAttendees != value)
{
selectedAttendees = value;
this.OnPropertyChanged(() => this.SelectedAttendees);
}
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.