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

AppointmentItem MouseOverlay

3 Answers 83 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
tye
Top achievements
Rank 1
tye asked on 07 Aug 2012, 09:58 PM

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?

3 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 09 Aug 2012, 12:33 PM
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.

0
tye
Top achievements
Rank 1
answered on 10 Aug 2012, 05:25 PM
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!
0
Vladi
Telerik team
answered on 13 Aug 2012, 01:07 PM
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.

Tags
ScheduleView
Asked by
tye
Top achievements
Rank 1
Answers by
Vladi
Telerik team
tye
Top achievements
Rank 1
Share this question
or