Hi
I'm using XamScheduleDataManger in my SL5 application.
I have problem showing working hour. I set 00:00 to 23:59:59(as I didn't want to have "NOT Working hour" Highlithed) as Working hour and now the XamDayView default starting time is 00:00, and every time i need to scroll down to see my appointments.
So I've following questions:
1) How can i remove "NOT working Hour" Highlighting ? (without changing default working hours)
2) How can i set the Start time so when I show XamDayView or XamWeekView it doesn't start from 00:00 but from xx:xx
3) Where can i get the default CalendarBrushes List ? (as I tried setting BaseColor property to different colors in ResourceCalendar but it's not good looking as the default Calendar brushes)
Thank you
Hello,
Thank you for your post. I have been looking into it and for the start time I can suggest you see this forum thread:
https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/49730/specify-initial-visible-hour-timeslot-in-xamdayview
where it is explained how to scroll to a particular hour. As for the styling of the TimeSlotPresenter, I can suggest you see these two forum threads:
https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/64477/changing-the-computedbackground-timeslot-colors/326306#326306
and
https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/83936/set-the-style-for-working-hours
https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/52620/customizing-the-time-slot-panel-in-xamschedule-day-view
which will help you to restyle it. In the third one it is mentioned where you can find the default Styles and brushes of the XamSchedule. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
To position the DayView(no matter what the working hours are) to certain hour of day i used the following code(positioning the scroll bar) :
private void XamDayView1_Loaded(object sender, RoutedEventArgs e){ ScrollBar scrollBar = (ScrollBar)GetDescendantFromName(XamDayView1, "TimeslotScrollBar");
double nowOffset = (DateTime.Now.Hour + 1) / 24.0; scrollBar.Value = nowOffset * scrollBar.Maximum;}
///
/// Gets a descendant FrameworkElement based on its name./// /// A descendant FrameworkElement with the specified name or null if not found.public static FrameworkElement GetDescendantFromName(DependencyObject parent, string name){ int count = VisualTreeHelper.GetChildrenCount(parent);
if (count < 1) return null;
FrameworkElement fe;
for (int i = 0; i < count; i++) { fe = VisualTreeHelper.GetChild(parent, i) as FrameworkElement; if (fe != null) { if (fe.Name == name) return fe;
fe = GetDescendantFromName(fe, name); if (fe != null) return fe; } }
return null;}
Thank you Stefan for your help.
I created another post in XamSchedule forum, give it a look please!
Bye bye
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.