Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Custom items in scheduler (Read 5347 times)
Gerco
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Dec 1st, 2010
Custom items in scheduler
Dec 2nd, 2010 at 2:39pm
Print Post  
Lets explain my situation:

A user has an appointment, the appointment begin 2:00. When the appointment gets selected, the user needs to see the preferred time of the appointment.

Example:

Appointment:
- StartTime : 2:00
- EndTime: 2:30
- PreferredStartTime: 1:30
- PreferredEndTime: 4:00

When i select this appointment i need to see the preferredtime with some kind of visual "hook". When my celltime was 5 minutes, i just painted the right side of my cellpresenter. Now that the cellpresenters are larger (1 hour), i only want the half of my cellpresenter painted. 

Is that possible, or is it possible to paintsome custom items on the scheduler. I know i can add some custom items, but when i do that the scheduler automatically resizes the width of the appointments.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Custom items in scheduler
Reply #1 - Dec 2nd, 2010 at 2:42pm
Print Post  
An option would be to display the preferred start/end times as text within the item itself using a custom ItemPresenter. Another option would be to display the preferred times in a tooltip.

If you instead want to visually indicate the preferred time by highlighting the corresponding cells in the Timetable when the item is selected, you can also do this - by using custom CellPresenters for the timetable cells.

Let me know which method is most suitable for you and I can give you more details.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Gerco
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Dec 1st, 2010
Re: Custom items in scheduler
Reply #2 - Dec 2nd, 2010 at 2:46pm
Print Post  
"If you instead want to visually indicate the preferred time by highlighting the corresponding cells in the Timetable when the item is selected, you can also do this - by using custom CellPresenters for the timetable cells. "

This is the way i want it.

I have it this way, and when the celltime was 5 minutes, i was ok with it. But now that the celltime is 1 hour, i have to paint a part of the cellpresenter. (How) can i do this?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Custom items in scheduler
Reply #3 - Dec 2nd, 2010 at 2:54pm
Print Post  
You have to design your presenter so that it supports partial filling. For example, you can add a grid with 3 rows and position the filling visual in the middle row. Then you can adjust the heights of these rows according to how much of the item's preferred time occupies the cell. For example, if the preferred time occupies the entire cell you can set top and bottom rows' heights to 0.

Let me know if this works.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Gerco
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Dec 1st, 2010
Re: Custom items in scheduler
Reply #4 - Dec 2nd, 2010 at 3:00pm
Print Post  
Ok, i will try that! Thanks you! I'll let you know.. (But i think it will take a couple of days before i'll can try..)
  
Back to top
 
IP Logged
 
Gerco
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Dec 1st, 2010
Re: Custom items in scheduler
Reply #5 - Dec 6th, 2010 at 10:31am
Print Post  
FYI: It works.

I've made a border in the custom cellpresenter:

Code
Select All
<Border Grid.Row="0" Grid.Column="2" Background="{Binding PreferredTimeStyle.Background}" Height="{Binding PreferredTimeStyle.Height}" VerticalAlignment="{Binding PreferredTimeStyle.VerticalAlignment}" />
 



The values are being calculated in the code behind.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint