This question is locked. New answers and comments are not allowed.
Hi,
I have some custom filtering of the appoinments created as in your demos.
With this kind of code (some parts left out):
I want to know when the filtering is complete, because then I need to do some calculations on the visible appointments.
I can't add an event to the Filter method, because it will be called for every appointment.
And I can't just do the calculation after I have called ApplyFilter, because the filtering is async and not ready then.
Is there another way of knowing when the filtering is complete?
Regards,
Håkan
I have some custom filtering of the appoinments created as in your demos.
With this kind of code (some parts left out):
public
void
ApplyFilter()
{
this
.OnPropertyChanged(
"AppointmentsFilter"
);
}
public
Predicate<IAppointment> AppointmentsFilter
{
get
{
return
this
.Filter;
}
}
private
bool
Filter(IAppointment appointment)
{
TimeScheduleShift shift = appointment
as
TimeScheduleShift;
bool
match = shift !=
null
&&
this
.FilterByShiftType(shift);
return
match;
}
private
bool
FilterByShiftType(TimeScheduleShift shift)
{
return
this
.SelectedShiftTypes.Count == 0 ||
this
.SelectedShiftTypes.Contains(shift.ShiftTypeId);
}
I want to know when the filtering is complete, because then I need to do some calculations on the visible appointments.
I can't add an event to the Filter method, because it will be called for every appointment.
And I can't just do the calculation after I have called ApplyFilter, because the filtering is async and not ready then.
Is there another way of knowing when the filtering is complete?
Regards,
Håkan