I have a requirement to be able to visually indicate the date range that is available for scheduling , based on some calculations. For instance, I need to be able to highlight on the scheduler a timeslot between 11:23 AM to 12:25 PM .
Attached is a sample source code , in which i was able to highlight "Timeslots" that are in the desired range, but i need to be able to highlight part of the timeslot (11:00 - 11:12) . I tried doing that by setting the timeslot interval to 1 minute, but then the height of each interval was too much and I could not figure a way to set the height of the interval.
Please suggest the best approach to accomplish this.
ThankYou,
Hariharan
You're binding to the TimeslotPresenter and your AvailableTimeSlots collection but your converter is using the values of the Start/End properties. WPF is only going to re-invoke the converter when the values of the Bindings in the multbinding are changed and not when sub-properties of the objects returned for those bindings are changed. i.e The binding won't get re-evaluated when the element is recycled and the Start/End properties are changed. You would need to bind explicitly to the Start and End properties.
Ok I added a style for TimeSlotPresenter and I am using triggers to adorn those timeslots that fall in the range of my avaiable slots.
The problem is , it is adorning other slots too while they are not contained within my list of availabel slots.Is it to do with UTC time or I am not sure if there is a different behavior for slots that are not visible whithin the current view.
I have attached a sample project.
When you click on the "Show Available Slots" button , the command method in MySchedulingViewModel(Method Name : GetAvailableSlots) populates a list of available slots. But when I look at the view, a whole lot of other timeslots gets adorned too.
Please suggest.
Thank You,
hariharan019 said:But if a set a height for the timeslot header, that will impact on how the tasks are shown right?
hariharan019 said:If I may ask, is there a way to mark time ranges in the calendar ?
The TimeslotPresenter's background is just based on the whether it is selected and then whether it is contains any working time or not. If you wanted to change the background based on other conditions you would probably need to retemplate the TimeslotPresenter and add your own styling.
But if a set a height for the timeslot header, that will impact on how the tasks are shown right? If I may ask, is there a way to mark time ranges in the calendar ? Like I want 10:35 AM to 11:45 PM on 19th of July to be marked or highlighted to indicate to the user that this slot is available for scheduling an appointment. This is more like the "hints" while playing computer chess, when you select a piece, it highlights the squares into which this piece can be moved.
Please Suggest.
The minimum height of a timeslot in xamDayView is based upon the larger of the height of a single line AppointmentPresenter and a DayViewTimeslotHeader element. This allows us to ensure that the header/appointment can show its content regardless of how it is styled. So you could probably create a style for the DayViewTimeslotHeader and set its MinHeight to the value you want to use. You might also submit a suggestion for adding a MinTimeslotHeight property to xamDayView.