Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic newbie at Mindfusion.Scheduling.WPF, how to create a timetable view with weekly view (Read 8346 times)
ricardo
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Mar 5th, 2013
newbie at Mindfusion.Scheduling.WPF, how to create a timetable view with weekly view
Mar 5th, 2013 at 2:24pm
Print Post  
how to create a timetable view with weekly view?

I saw some samples that you can use groups, etc, but I dont know how to display a Scheding.Calendar.Wpf with a view of 5 days (Monday to Friday)

Can you help me on this, we are evaluating your product but in order to get authorization to buy it I need to verify that this is possible.

regards
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: newbie at Mindfusion.Scheduling.WPF, how to create a timetable view with weekly view
Reply #1 - Mar 5th, 2013 at 3:00pm
Print Post  
Hi,

If you want to display several days in a Timetable view, you need to add the days of interest to the Calendar.TimetableSettings.Dates collection and set Calendar.CurrentView to CalendarView.Timetable. For example, the following code displays the days Mon-Fri of the current week inside a Timetable view:

Code
Select All
DateTime monday = DateTime.Today;
while (monday.DayOfWeek != DayOfWeek.Monday)
	monday = monday.AddDays(-1);
calendar.TimetableSettings.Dates.Clear();
for (int i = 0; i < 5; i++)
	calendar.TimetableSettings.Dates.Add(monday.AddDays(i));
calendar.CurrentView = CalendarView.Timetable 


Alternatively, you can use the WeekRange or List views, set up to display only five days, such as in the example below:

Code
Select All
calendar.EndDate = calendar.Date.AddDays(5);
calendar.WeekRangeSettings.ViewStyle = WeekRangeViewStyle.SingleWeek;
calendar.CurrentView = CalendarView.WeekRange; 


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


I Love MindFusion!

Posts: 12
Joined: Mar 5th, 2013
Re: newbie at Mindfusion.Scheduling.WPF, how to create a timetable view with weekly view
Reply #2 - Mar 5th, 2013 at 3:19pm
Print Post  
perfect this is what we looking for ...
thanks
  
Back to top
 
IP Logged
 
ricardo
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Mar 5th, 2013
Re: newbie at Mindfusion.Scheduling.WPF, how to create a timetable view with weekly view
Reply #3 - Mar 13th, 2013 at 9:48pm
Print Post  
one more question, how can I do to display only working hours?
or at least if not showing not working hour is not possible, to scroll automatically, for example, to 8:00am as first line?
  
Back to top
 
IP Logged
 
ricardo
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Mar 5th, 2013
Re: newbie at Mindfusion.Scheduling.WPF, how to create a timetable view with weekly view
Reply #4 - Mar 13th, 2013 at 10:14pm
Print Post  
another question, how can I personalize the scrollbar? I have some templates that I use always to personalize the scrollbar, and I want to apply it to the control.

thanks
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: newbie at Mindfusion.Scheduling.WPF, how to create a timetable view with weekly view
Reply #5 - Mar 14th, 2013 at 7:42am
Print Post  
Hi,

Quote:
one more question, how can I do to display only working hours?
or at least if not showing not working hour is not possible, to scroll automatically, for example, to 8:00am as first line?

You can scroll programmatically through the Calendar.VScrollPos property. For example, to scroll to 8 AM in a Timetable with 30 minute cells, set VScrollPos to 16.

Quote:
how can I personalize the scrollbar? I have some templates that I use always to personalize the scrollbar, and I want to apply it to the control.

Simply define a Style resource containing a ControlTemplate setter with TargetType set to ScrollBar and this ControlTemplate should be automatically applied to the scrollbars in the Calendar control. Effectively it is the same technique that you would use to implicitly style the other scrollbars in your application. For example, if you define this Style in the application's Resources collection, it will affect all scrollbars in the application, including the Calendar ones.

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


I Love MindFusion!

Posts: 12
Joined: Mar 5th, 2013
Re: newbie at Mindfusion.Scheduling.WPF, how to create a timetable view with weekly view
Reply #6 - Mar 14th, 2013 at 1:57pm
Print Post  
VScrollPos works perfect

the scrollbar didnt work... can you paste a simple example here?

regards
Ricardo
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: newbie at Mindfusion.Scheduling.WPF, how to create a timetable view with weekly view
Reply #7 - Mar 14th, 2013 at 3:37pm
Print Post  
Check out this sample:

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

It uses the same scrollbar for the Calendar and the ScrollViewer.

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


I Love MindFusion!

Posts: 12
Joined: Mar 5th, 2013
Re: newbie at Mindfusion.Scheduling.WPF, how to create a timetable view with weekly view
Reply #8 - Mar 14th, 2013 at 5:59pm
Print Post  
thanks perfect
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint