Hi
Frédéric,
Thanks
for using Syncfusion product.
As
of now we don’t have any property to set FirstDayOfWeek and appointment
background in schedule control but it can be achieved in the upgraded SfSchedule
control. Please find the below documentation for more details about SfScheduel
control and please let us know your interest in SfSchedule
control.
UG
Link: http://help.syncfusion.com/wpf/sfschedule/overview
1.
Switch to day view from month.
As
of now it is expected behavior that switch to day view from month when we click
events text block in the month view cell.
2.
Setting appointment background.
As of now your requirement of setting background to the appointment can be achieved by using AppointmentBackground property of ScheduleAppointment class in the Sfschedule control. Please find the below code snippet for setting AppointmentBackground.
C#
ScheduleAppointment
app = new
ScheduleAppointment(); app.Subject = "Meeting"; app.StartTime = DateTime.Now.AddHours(2); app.EndTime = DateTime.Now.AddHours(4); app.AppointmentBackground =
new
SolidColorBrush(Colors.Gray);
Schedule.Appointments.Add(app); |
3.
Setting Monday as first day of week.
As
of now your requirement of setting Monday as first day of week can be achieved
by using the FirstDayOfWeek property in the sfschedule
control.
We
have prepared a sample for setting appointment background and first day of week
and please find the sample in the below link.
Sample
Link: SfSchedule_Sample
Please
let us know if you have any concern.
Regards
Vigneshkumar
R
Hi Frédéric
We have created a separate incident for this query, please login to below location to have follow up regarding this query.
Link: https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Please let us know if you have any concern.
Regards
Vigneshkumar R
Hi Frédéric
As of now your requirement of changing appointment subject foreground can be achieved by using AppiontmentTemplate in the schedule control. We have prepared sample for the same and please find the sample in the below link.
Sample link: SfSchedule_Sample
We have used below code to change appointment subject foreground in the above sample.
C#:
<syncfusion:SfSchedule.AppointmentTemplate> <DataTemplate> <Border Background="{Binding AppointmentBackground}"> <TextBlock Text="{Binding Subject}" Foreground="Black"></TextBlock> </Border> </DataTemplate> </syncfusion:SfSchedule.AppointmentTemplate> |
Regards
Vigneshkumar R
Hi Frédéric
As per you requirement we have created a sample to create AppointmentTamplate in code behind for changing the foreground of appointment subject. We can create appointment template in code behind by using FrameworkElementFactory class. Please find the sample in the below link.
Sample Link: SfSchedule_Sample
We have used below code snippet in the above sample to create appointment template in code behind.
C#
DataTemplate AppTemplate = new DataTemplate(); FrameworkElementFactory grid = new FrameworkElementFactory(typeof(Grid)); FrameworkElementFactory border = new FrameworkElementFactory(typeof(Border)); border.SetBinding(Border.BackgroundProperty, new Binding("AppointmentBackground")); grid.AppendChild(border); FrameworkElementFactory textBlock = new FrameworkElementFactory(typeof(TextBlock)); textBlock.SetBinding(TextBlock.TextProperty, new Binding("Subject")); textBlock.SetValue(TextBlock.ForegroundProperty, new SolidColorBrush(Colors.Yellow)); grid.AppendChild(textBlock); AppTemplate.VisualTree = grid; Schedule.AppointmentTemplate = AppTemplate; |
Regards
Vigneshkumar R