SelectedAppointment does not work if the Appointment has a RecurrenceRule

2 posts, 1 answers
  1. Marco
    Marco avatar
    8 posts
    Member since:
    Nov 2017

    Posted 30 Nov 2017 Link to this post

    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

  2. Answer
    Kalin
    Admin
    Kalin avatar
    1326 posts

    Posted 04 Dec 2017 Link to this post

    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.
Back to Top