Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic highlight/style for official holidays? (Read 4171 times)
springy
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 76
Joined: Jan 25th, 2010
highlight/style for official holidays?
Jan 25th, 2010 at 9:32am
Print Post  
Is there a way for highlighting (with a style) official holidays like X-mas, Easter, etc.?
  

/\/\arkus.
Back to top
 
IP Logged
 
springy
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 76
Joined: Jan 25th, 2010
Re: highlight/style for official holidays?
Reply #1 - Jan 25th, 2010 at 10:25am
Print Post  
I noticed an out-commented property "DayStyles" in the DualView sample -- but this property does not exist (yet / anymore)?
  

/\/\arkus.
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: highlight/style for official holidays?
Reply #2 - Jan 25th, 2010 at 10:51am
Print Post  
There is currently no way for customizing the appearance of individual days in the calendar. We are currently working on implementing this functionality. I will let you know when we have something ready. The DayStyles you found in the DualView sample was indeed the way to specify custom day styles in the predecessor - MindFusion.Scheduling for WinForms.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: highlight/style for official holidays?
Reply #3 - Jan 27th, 2010 at 2:00pm
Print Post  
A sample illustrating how to use the new customizability options for view cells can be downloaded from the following link:

https://mindfusion.eu/_samples/_wpfsample_Holidays.zip

In order to use the sample, you need this version of the control:

https://mindfusion.eu/_pln_trial/MindFusion.Scheduling.Wpf.2.1.zip

The sample uses the newly introduced CellPresenter in order to provide custom ControlTemplates for individual cells in the view. The control templates are supplied through .NET Style objects, which are assigned to the desired CellPresenter objects in the Calendar.CellPresenterCreated event handler.

The Style itself is defined as a resource in the application - App.xaml. The template defined in the sample is very similar to the default cell template except it adds a yellow gradient at the top of the cell indicating that the cell is a holiday.

You can customize the control template further to match your needs. You can define other styles for different holidays and assign them to the CellPresenter of the corresponding cells in the Calendar.CellPresenterCreated event hander.

It is also possible to create custom CellPresenter classes. A sample illustrating how to do this will be included in the next release of the control.

Any suggestions about this new functionality are welcome.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint