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

ContentTemplate of TimeRulerMonthViewItem Could not Change Content

1 Answer 50 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 08 Jul 2013, 02:42 AM
I couldn't to change TimeRulerMonthViewItem.


Code snippets   below :

 <Window.Resources>
            <Style x:Key="TimeRulerMonthViewItemStyle" TargetType="telerik:TimeRulerMonthViewItem">
            <Setter Property="telerik:StyleManager.Theme" Value="Windows8"/>
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <TextBlock Text="WhyCantChanged"/>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
     </Style>
        <telerik:OrientedTimeRulerItemStyleSelector x:Key="Origin" 
                                                 MonthViewTickStyle="{StaticResource TimeRulerMonthViewItemStyle}"/>
    </Window.Resources>
<Grid>
        <telerik:RadScheduleView x:Name="ScheduleView"
                                  telerik:StyleManager.Theme="Windows8" TimeRulerItemStyleSelector="{StaticResource Origin}">
            <telerik:RadScheduleView.Resources>
                <Style TargetType="telerik:RadButton">
                    <Setter Property="ContentTemplate">
                        <Setter.Value>
                            <DataTemplate>
                                <TextBlock Text="I am Mark."/>
                            </DataTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </telerik:RadScheduleView.Resources>
            <telerik:RadScheduleView.ViewDefinitions >
                <telerik:MonthViewDefinition/>
            </telerik:RadScheduleView.ViewDefinitions>
        </telerik:RadScheduleView>
    </Grid>

It could not change  Content. Do I just have to setting its ControlTemplate ,Only one way? Why not setting ContentTemplate?


1 Answer, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 09 Jul 2013, 03:53 PM
Hello Lee,

In the current implementation of the ScheduleView the ContentTemplate property is not implemented - you should set the content in a custom ControlTemplate. I would suggest you to use the default ControlTemplate as base and modify it as required when creating custom ControlTemplate in order to have the complete functionality of the ScheduleView.

Hope this helps.

Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ScheduleView
Asked by
Lee
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or