This is a migrated thread and some comments may be shown as answers.

SelectedAppointment does not work if the Appointment has a RecurrenceRule

1 Answer 79 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
alang
Top achievements
Rank 1
alang asked on 30 Nov 2017, 02:20 PM

Hello Telerik Team

We use the MVVM pattern. In order to be able to handle appointments in the ViewModel, we need to know which appointment is currently selected. If the Appointment has a RecurrenceRule, the binding to the SelectedAppointment Propery doesn't work.

Here is a test project on my OneDrive account: https://1drv.ms/u/s!ApC9hrIinTjDcltMasjw7vSKeAc

Regards,
Marco

1 Answer, 1 is accepted

Sort by
0
Accepted
Kalin
Telerik team
answered on 04 Dec 2017, 04:09 PM
Hello Marco,

The type of the property should be IOccurrence in order to work both with appointments and occurrences of recurring appointments. Please change the property as shown below:

private IOccurrence _selectedAppointment;
public IOccurrence SelectedAppointment
{
    get { return _selectedAppointment; }
    set
    {
        _selectedAppointment = value;
        RaisePropertyChanged();
    }
}

Hope this helps.

Regards,
Kalin
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ScheduleView
Asked by
alang
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or