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
95
Highlighting a timeslot on DayView in code
posted

In the DayView component, when a user clicks on a timeslot under any given owner, that timeslot gets highlighted. I'm trying to accomplish the same thing in code. Basically, instead of the user left-clicking on a timeslot, I want to highlight one for them. So far, I've been able to get the TimeSlotUIElement object for the timeslot that I want to highlight using the following code.

 

UW.TimeSlot ts = vDays.GetTimeSlotFromTime(dtTimeToHighlight);
object[] contexts = new object[2] { myOwner, ts };
InfWin.DayView.TimeSlotUIElement tsUI =
   vDays.UIElement.GetDescendant(typeof(UW.DayView.TimeSlotUIElement), contexts)
   as InfWin.DayView.TimeSlotUIElement;

This code appears to return the correct UI element, however I can't figure out what I need to do with it to produce the same effect as the user clicking on it. I had assumed there was a Selected property or perhaps an OnClick event that I could fire manually to highlight this timeslot, but I can't seem to find anything like that.

Thanks,

- Bret