Hi,
As the title says, when the XamDayView loads I need to guarantee that a specific Time slot is visible.
For example: if someone opens the XamDayView and the first appointment occurs at 10 AM, I want to display that particular timeslot at 10AM so that the appointment is visible (the display needs to be scrolled to make that particular time slot visible)
I'm searching for a functionality equal to EnsureTimeSlotVisible that exists for UltraDayView.
Is there something similar for XamDayView? If not, how can this be done?
Best Regards.
the scroll bar value gets reset later in event during Schedules.ScheduleTimeControlBase.BringTimeslotIntoView call, is there other workaround to avoid this?
Hello Steven,
The calculations Vlad made, are not related to the TimeSlot's Interval.
Hope this helps you.
Hi
Is the above scrollbar calculation dependent on TimeSlot interval setting?
If yes, how can we take that into account?
thanks
Steven
Thanks, it sure helps!
Maybe this will be useful to you:
private void XamDayView1_Loaded(object sender, RoutedEventArgs e)
{
ScrollBar scrollBar = (ScrollBar)Infragistics.Windows.Utilities.GetDescendantFromName(XamDayView1, "TimeslotScrollBar");
double nowOffset = (DateTime.Now.Hour + 1) / 24.0;
scrollBar.Value = nowOffset * scrollBar.Maximum;
}
This code scrolls the current hour into view if you have viewable 24 hours in the day view. Hope this helps.
Thanks,
Diyan Dimitrov