AppointmentItem MouseOverlay

4 posts, 0 answers
  1. tye
    tye avatar
    2 posts
    Member since:
    Aug 2012

    Posted 07 Aug 2012 Link to this post


    I am using a custom dialog for opening/editing appointments in Week View.  This works fine.  The only problem i'm having is when the childwindow closes, the appointmenitem in the Week View remains highlighted (the MouseOverlay remains visible), leaving multiple appointmentitems hightlighted.

    How can i send the appointment item back to the 'Normal' VisualState, or cycle thru appointments source and apply the  "MouseOverExitStoryboard" animation to collapse the mouseoverlay for each item?
  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 09 Aug 2012 Link to this post

    Hi,

    To deselect the appointment after creating or editing an existing one you could use the AppointmentCreated and AppointmentEdited events. In them you can set the SelectedAppointment property of the ScheduleView to null which will deselect any selected items in the control. The following code snippet represent the described approach:

    In the XAML:

    <telerik:RadScheduleView x:Name="theScheduleView"
                    AppointmentCreated="RadScheduleView_AppointmentCreated"
                    AppointmentEdited="theScheduleView_AppointmentEdited" />
     
    and in the code behind:

    private void RadScheduleView_AppointmentCreated(object sender, Telerik.Windows.Controls.AppointmentCreatedEventArgs e)
    {
        Dispatcher.BeginInvoke(new Action(() =>
        {
            this.theScheduleView.SelectedAppointment = null;
        }));
    }
     
    private void theScheduleView_AppointmentEdited(object sender, AppointmentEditedEventArgs e)
    {
        Dispatcher.BeginInvoke(new Action(() =>
        {
            this.theScheduleView.SelectedAppointment = null;
        }));
                 
    }

    Hope this helps.

    Kind regards,
    Vladi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. tye
    tye avatar
    2 posts
    Member since:
    Aug 2012

    Posted 10 Aug 2012 Link to this post

    Thank you Vladi, but I am referring to the MouseOverOverlay element in the AppointmentItemControlTemplate that is made visible when HOVERING.  There is a selected state and a mouse over state.  I am referring to the MouseOver state of the appointment item in the week view.  I double click on it, then when the child window is closed the MouseOver border is still visible.  If i open another, it will stay visible as well, leaving me with multiple appointment items in the MouseOver state.  It will go away only if i mouseOver and then out again.

    Thank you for your assistace!
  5. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 13 Aug 2012 Link to this post

    Hi,

    I am not sure i understand you correctly. I recorded a short video showing how the control looks at our end when opening the EditAppointmentDialog and then opening another one after closing the first one.

    Take a look at it and tell me if i am missing something.

    Kind regards,
    Vladi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top