Hi
Is there a way I can customize the time slot panel in XAMSchedule dayview.
1) What I want to do is to Run the time slot panel from say 6am Sunday to 5am Monday (i.e. I Still have 24hrs a day but my day Starts from 6am today and ends at 5am tomorrow). I should be able to still call it Sunday.
2) If 1 is possible can I also change the display time as start from 6 to 30 hr. clock(Just the display of time) (i.e. so instead of displaying 1,2,3 …..23 can I display 6,7,8…….28, 29,30
If the above 1 and 2 is not possible
1) Then can i just change the timeslot to display time in 6 to 30 hr. clock style.
2) And disable primary time zone and just display the secondary time zone.
I have attached the screen shots to explain waht i ment.
Regards
Saurabh
If you want your day to be considered as starting at 6am and ending at 6am of the following day (instead of 12am to 12am) then you can set the XamScheduleDataManager->Settings->LogicalDayOffset to 6 hours. This will affect all controls associated with the datamanager. So if the VisibleDates of day/scheduleview contains 2/25/2011, you would see the timeslots (and any activity) for 2/25/2011 6:00am to 2/26/2011 6am. If you had a xamMonthView showing the weeks for Feb 2011 and you look at Thursday 2/25/2011, you would see any activity that intersects 2/25/2011 6:00am to 2/26/2011 6am. If you had an activity that started on 2/25/2011 5:00am and end on 2/25/2011 5:30 am, it would show up under Wed 2/24/2011.
Thanks Andrew,
Sorry i am new to .net and WPF.
I have trie it by setting
dataManager.Settings.LogicalDayOffset = new System.TimeSpan(6, 0, 0);
bu i keep getting exception 'Object reference not set to an instance of an object.'
Hope you can help if i am doing something very stupid.
Settings is a get/set property. So you must set the Settings to a new ScheduleSettings() instance.
Hi Andrew,
You are Rock.
If posible please can you also let me know my second query
represent 6,7,8...30. i.e 30hr time period in timeslot panel.
Many thanks
The elements displayed in the TimeslotHeaderArea that represent the time slot labels are the DayViewTimeslotHeader (for xamDayView) or ScheduleViewTimeslotHeader (for xamScheduleView). If you want to change the textual representation then you would have to create your own custom template for that element. You can look at the DefaultStyles shipped with the product as a starting point for creating your own custom template. You would likely end up having to replace the TimeslotHeaderTimePresenter used in the default template with a textblock, etc. that binds to the Start and then adjust it as needed.
thanks for the reply. This works fine now.
Best Regards,
Steven
A converter of a Binding is only called when the source value changes or in the case of a multibinding when one of the values of one of the bindings has changed. Scrolling horizontally would not result in a change to the window's datacontext, the start time of the timeslot, the end time of the timeslot and typically not the IsWorkingHour state so what is happening is correct based on the bindings. If you want to account for when it's changed for a different calendar then you'll likely want to add another binding - e.g. for the DataContext of the timeslot itself since that would be the selected calendar of the containing calendar group. So add something like "<Binding Path="DataContext" RelativeSource="{RelativeSource Self}" />" to the end of the list of Bindings in the MultiBinding. You'll also need to update the converter because in the sample it is checking for a length of 4 values being provided. I attached an updated version of the sample from above but that's the only changes I made.
Hi Stefan,
The TimeslotTypeValueConverter get triggered fine, if I scroll up and down the vertical scrollbar.
But similarly to http://es.infragistics.com/community/forums/t/84840.aspx
In DayView, I have set dayView.PreferredCalendarGroupExtent = 150;
Hence when there is a lot of ResourceCalendar visible, the 'TimeslotGroupScrollBar" will appear.
scrolling left and right this horizontal scrollbar DOES NOT trigger the TimeslotTypeValueConverter, hence I am showing timeslots that don't belong to the scrolled resource.
Is there a way to fix this? Thanks
I actually found the way to do this. All I needed is to get the list of timeslots and update binding. That was all.
Thanks for you help
Hello Steven,
it seems like that I am missing something in your scenario, so feel free to modify the sample I sent you, so it reproduces your behavior and send it back to me for further investigation.
Looking forward for your reply.