Customize group header

2 posts, 0 answers
  1. Josh
    Josh avatar
    17 posts
    Member since:
    Aug 2012

    Posted 03 Apr 2013 Link to this post

    Hi I am trying to customize the look of the group header with the use of data templates. When ever I do this no group header is displayed. I have tried to to use the Group Header template selector and to modify content template within the style selector both have th same results.  Here is the xmal I am trying to use. I have verified that the event creation style is being applied.
    <ecu:GroupHeaderStyleSelector x:Key="GroupHeaderStyleSelector">
                <ecu:GroupHeaderStyleSelector.DateStyle>
                    <Style TargetType="telerik:GroupHeader">
                        <Setter Property="Visibility" Value="Collapsed"/>
                    </Style>
                </ecu:GroupHeaderStyleSelector.DateStyle>
                <ecu:GroupHeaderStyleSelector.EventCreationStyle>
                    <Style TargetType="telerik:GroupHeader">
                        <Setter Property="Visibility" Value="Visible"/>
                        <Setter Property="Height" Value="100"></Setter>
                        <Setter Property="VerticalAlignment" Value="Top">
                        </Setter>
                        <Setter Property="ContentTemplate">
                            <Setter.Value>
                                <DataTemplate>
                                    <TextBlock>Audio</TextBlock>
                                </DataTemplate>
                            </Setter.Value>
                        </Setter>
                        <!--<Setter Property="Template" Value="{StaticResource Testing}"></Setter>-->
                    </Style>
                </ecu:GroupHeaderStyleSelector.EventCreationStyle>
            </ecu:GroupHeaderStyleSelector>

    On the control I am doing the following 
    <telerik:RadScheduleView Grid.Row="2"
                                     DialogClosing="eventsTimeline_DialogClosing_1"
                                      
                                 AppointmentsSource="{Binding Events, Mode=TwoWay}"
                                 NavigationHeaderVisibility="Collapsed"
                                 ShowDialog="RadScheduleView_ShowDialog"
                                 ResourceTypesSource="{Binding EventTypes}"                            
                                 TimeRulerItemStyleSelector="{StaticResource TimeRulerItemStyleSelector}"
                                 GroupHeaderStyleSelector="{StaticResource GroupHeaderStyleSelector}"
                                 
                                 AppointmentEditing="RadScheduleView_AppointmentEditing"
                                 AppointmentSaving="eventsTimeline_AppointmentSaving" 
                                 AppointmentCreating="eventsTimeline_AppointmentCreating_1"
                                 AppointmentCreated="eventsTimeline_AppointmentCreated"
                                 AppointmentSelectionChanged="eventsTimeline_AppointmentSelectionChanged_1"
                                 AppointmentDeleting="eventsTimeline_AppointmentDeleting_1"
                                 AppointmentDeleted="eventsTimeline_AppointmentDeleted_1"
                                 DeleteAppointmentConfirmDialogStyle="{StaticResource DeleteEventConfirmDialogStyle}"
                                 ResizeHighlightStyle="{StaticResource EventResizeHighlightStyle}"
                                 Name="eventsTimeline" VerticalAlignment="Top">
                <telerik:RadScheduleView.ViewDefinitions>
                    <telerik:DayViewDefinition
                        VisibleDays="1"
                        MajorTickLength="5min"
                        MinorTickLength="1min"
                        MinTimeRulerExtent="5000"
                        TimerulerMajorTickStringFormat="{}{0: HHmm}"
                        DayStartTime="00:00:00" DayEndTime="3:00:00" Orientation="Horizontal">
                    </telerik:DayViewDefinition>
                </telerik:RadScheduleView.ViewDefinitions>
     
                <telerik:RadScheduleView.DragDropBehavior>
                    <ecu:EventCreationDragDropBehavior />
                </telerik:RadScheduleView.DragDropBehavior>
     
                <telerik:RadScheduleView.AppointmentStyleSelector>
                    <ecu:EventStyleSelector
                            AudioEventStyle="{StaticResource AudioEvent}"
                            OdorEventStyle="{StaticResource OdorEvent}"
                            LightingEventStyle="{StaticResource LightingEvent}"
                            SmokeEventStyle="{StaticResource SmokeEvent}"/>
                </telerik:RadScheduleView.AppointmentStyleSelector>
     
                <telerik:RadScheduleView.GroupDescriptionsSource>
                    <telerik:GroupDescriptionCollection>
                        <telerik:ResourceGroupDescription ResourceType="Event Types" />
                    </telerik:GroupDescriptionCollection>
                </telerik:RadScheduleView.GroupDescriptionsSource>
            </telerik:RadScheduleView>

    Everything worked as intended until I tried to modify the control template. When I tried using the template selector I got the exact same results.
  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 08 Apr 2013 Link to this post

    Hi,

    You can read our help article about Templating the GroupHeaders that describes the necessary steps needed in order to customize the GroupHeaders in the ScheduleView control and you can also check our online demo that demonstrates custom GroupHeaderTemplates.

    Hope this information is helpful.

    Greetings,
    Vladi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top