Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
395
XamScheduleView detect active calendar changes
posted

Hello,

how can I detect the visibility changes of certain calendars. I have a few calendars in my applications and I want to know when which one get's visible.

Is that possible? If so, how?

I know that there is a "ActiveCalendarChanged" event. But that is only fired when the user clicks into the new calendar that was activated. Thats not what I want. I want to know when the "collection of active calendars" has changed.

Thank you

  • 34430
    Offline posted

    Hello tegos,

    There currently isn't an event in the XamScheduleView or its list connector or data manager that is dedicated to detection of when the visible calendars change. This is not to say that it is not possible to detect this change, though.

    I would recommend that you hook into the PropertyChanged event of your ResourceCalendar objects that you are placing in your XamScheduleView. Doing this will allow you to check the e.PropertyName property of the event arguments for "IsVisible," which will allow you to detect when that particular ResourceCalendar's visibility has changed. The code for this could look like the following:

    private void Calendar_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
    {
      if (e.PropertyName.Equals("IsVisible"))
      {
        //Visible calendars changed.
      }                                  
    }

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer