Articles in this section
Category / Section

How to customize the default style of Schedule elements in WindowsPhone WinRT?

2 mins read

SfSchedule allows you to customize by overriding the default styles. The following section explains the customization of some basic elements in Schedule.

Customizing Default Style of SfSchedule Elements

Create a Windows Phone WinRT application and add SfSchedule control as follows. Apply the default style customization of Schedule elements as follows.

XAML

<Schedule:SfSchedule x:Name="schedule"  ScheduleType="Week" />

Customizing the AllDay foreground in Day View

In order to customize the foreground color of AllDay in Day view, you need to override the default style of ScheduleDaysView control and add the necessary style in the application as follows.

XAML

<Style TargetType="Schedule:ScheduleDaysView">
            <Setter Property="BorderBrush" Value="Red"/>
        </Style>

Customizing the WeekViewItems foreground and Border in Week View

To customize the WeekViewItems foreground and border, you need to override the default style of WeekViewItem control and add the necessary style in the application as follows.

XAML

   <Style TargetType="Schedule:WeekViewItem">
            <Setter Property="Foreground" Value="SkyBlue"/>
            <Setter Property="BorderBrush" Value="SlateBlue"/>
        </Style>

Customizing the foreground of WeekViewMonthCalendar and Borders in Week View

Similar to customizing the foreground color of the Month calendar text in Week View, you need to override the default style of WeekViewMonthCalendar control and add the necessary style in the application as follows.

XAML

   <Style TargetType="Schedule:WeekViewMonthCalendar">
            <Setter Property="Foreground" Value="Green"/>
            <Setter Property="BorderBrush" Value="SlateBlue"/>
        </Style>

The following example illustrates the default style customization of week view items foreground and Border in Schedule week view.

Sample Link: SfSchedule_WPWinRT.zip

In the above example you can customize the AllDay text, directly, by applying the styles given above for customizing AllDay text and by changing the schedule type to Day View respectively. The output for AllDay Customization is as follows.

Screenshots

Figure 1: AllDay Text customized in SfSchedule Day View

Figure 2: Customization of Week View Items and Border

Figure 3: Customization of Month foreground color in Week View Month Calendar

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied