This is a migrated thread and some comments may be shown as answers.

Scheduler days 2 digit size

1 Answer 68 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Mehmet
Top achievements
Rank 1
Mehmet asked on 29 Jul 2012, 01:16 PM

Hi,

I want to change Scheduler days view from 3 digit to 2 digit.
What should I do?
Sample code is below.

 <telerik:RadScheduleView.ViewDefinitions>
    <telerik:TimelineViewDefinition VisibleDays="31" TimerulerGroupStringFormat="{}{0:dd ddd}"
       TimerulerMajorTickStringFormat="{}{0:%M}.{0:%d}"  LargeChangeInterval="15d" MajorTickLength="1d"
        MinorTickLength="1d" GroupTickLength="1d"/>
   </telerik:RadScheduleView.ViewDefinitions>

Mehmet,
Regards

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 02 Aug 2012, 12:55 PM
Hello Mehmet,

We are using the standard date and time format strings described in this article. Note that there is no format string for 2 digit days. Anyway, I can suggest you a different approach to achieve the requirement - you could set the TimeRulerItemTemplateSelector property of the ScheduleView and customize the needed text in the Group TimeRulerItem.  You should use HorizontalTimelineGroupTemplate property  - I would suggest to create a ValueConverter to convert the day name:


<local:TimeRulerItemTemplateSelector x:Key="CustomTimeRulerItemTemplateSelector">
    ...
    <local:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding FormattedValue, Converter={StaticResource DayConverter}}" Margin="2 1" TextAlignment="Left" />
        </DataTemplate>
    </local:TimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
    ...
</local:TimeRulerItemTemplateSelector>

I've attached a simple example to demonstrate the approach. Hope this helps.

Greetings,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ScheduleView
Asked by
Mehmet
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or