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

OrientedGroupHeaderContentTemplateSelector does not work in Q3 anymore

2 Answers 60 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Rudolf
Top achievements
Rank 1
Rudolf asked on 11 Jan 2012, 02:36 PM
Hi !

I have a WPF Browser Application, which worked good with Release Q2 of Telerik WPF components.

I just updated them to latest stable Q3 release, and now the the OrientedGroupHeaderContentTemplate does
not work anymore. It will only display the default resource view - i've changed nothing in my xaml ...

can you please help me, it's very urgent

snippet from my xaml

<scheduleView:OrientedGroupHeaderContentTemplateSelector x:Key="GroupHeaderContentTemplateSelector">
            <!-- Default templates: -->
            <scheduleView:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
                <DataTemplate>
                    <Border Background="#959595" Width="310" Margin="0 0 0 0">
                        <StackPanel Margin="5 5 5 5" Orientation="Horizontal">
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Group}" HorizontalAlignment="Left" Width="150"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="|"  HorizontalAlignment="Center" Width="10"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Name}"  HorizontalAlignment="Left" Width="150"/>
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </scheduleView:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
            <scheduleView:OrientedGroupHeaderContentTemplateSelector.HorizontalResourceTemplate>
                <DataTemplate>
                    <Border Background="#959595" Width="310" Margin="0 0 0 0">
                        <StackPanel Margin="5 5 5 5" Orientation="Horizontal">
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Group}" HorizontalAlignment="Left" Width="150"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="|"  HorizontalAlignment="Center" Width="10"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Name}"  HorizontalAlignment="Left" Width="150"/>
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </scheduleView:OrientedGroupHeaderContentTemplateSelector.HorizontalResourceTemplate>
        </scheduleView:OrientedGroupHeaderContentTemplateSelector>

and the scheduleview

<scheduleView:RadScheduleView x:Name="SchedulerMonat"
                                          ActiveViewDefinitionIndex="0"
                                          AppointmentsSource="{Binding Appointments}"
                                          ResourceTypesSource="{Binding ResourcesTypes}"
                                          GroupDescriptionsSource="{Binding GroupDescirptionSource}"
                                          GroupHeaderContentTemplateSelector="{StaticResource GroupHeaderContentTemplateSelector}"
                                          SpecialSlotsSource="{Binding SpecialSlots}"
                                          SpecialSlotStyleSelector="{StaticResource SpecialSlotStyleSelector}"
                                          ToolTipTemplate="{StaticResource AppointmentToolTipTemplate}"
                                          AppointmentCreating="SchedulerMonat_AppointmentCreating"
                                          AppointmentEditing="SchedulerMonat_AppointmentEditing"
                                          ShowDialog="SchedulerMonat_ShowDialog"
                                          VisibleRangeChanged="SchedulerMonat_VisibleRangeChanged"
                                          Margin="0,103,0,0"
                                           
                                          VisibleRangeChangedCommand="{Binding VisibleRangeChanged}"
                                          VisibleRangeChangedCommandParameter="{Binding VisibleRange, RelativeSource={RelativeSource Self}}"
                                          AppointmentEdited="SchedulerMonat_AppointmentEdited"
                                          SnapAppointments="True"
                                          >
                <scheduleView:RadScheduleView.AppointmentStyleSelector>
                    <monatsmatrixWPF_extension:AppointmentStyleSelector Level200HorizontalStyle="{StaticResource Level200HorizontalStyle}" Level200HorizontalStyleCrossed="{StaticResource Level200HorizontalStyleCrossed}" Level200HorizontalStyleLeft="{StaticResource Level200HorizontalStyleLeft}" Level200HorizontalStyleRight="{StaticResource Level200HorizontalStyleRight}" HorizontalStyle="{StaticResource Level200HorizontalStyle}" />
                </scheduleView:RadScheduleView.AppointmentStyleSelector>
                <scheduleView:RadScheduleView.ViewDefinitions>
                    <scheduleView:TimelineViewDefinition VisibleDays="30" TimerulerGroupStringFormat="{}{0:dd ddd}" TimerulerMajorTickStringFormat="" Title="Monatsansicht - " LargeChangeInterval="31d"/>
                </scheduleView:RadScheduleView.ViewDefinitions>
                <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu Name="ContextMenu" IsOpen="{Binding IsContextMenuOpen, Source={StaticResource ContextMenueDataModel},Mode=TwoWay}" ScrollViewer.CanContentScroll="True">
                        <telerik:RadMenuItem Name="ContextMenuNew" Header="Neuer Termin" Command="{Binding NewCommand, Source={StaticResource ContextMenueDataModel}}" CommandParameter="{Binding Menu.UIElement.SelectedSlot, RelativeSource={RelativeSource Self}}" Click="FabaContextMenue_Click">
                            <telerik:RadMenuItem.Icon>
                                <Image Source="/monatsmatrixWPF;component/img/Neu.png"></Image>
                            </telerik:RadMenuItem.Icon>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem IsSeparator="True" />
                        <telerik:RadMenuItem Name="ContextMenuRead" Header="Termin lesen" Command="{Binding ReadCommand, Source={StaticResource ContextMenueDataModel}}" CommandParameter="{Binding Menu.UIElement.SelectedAppointments, RelativeSource={RelativeSource Self}}" Click="FabaContextMenue_Click">
                            <telerik:RadMenuItem.Icon>
                                <Image Source="/monatsmatrixWPF;component/img/Lesen.png"></Image>
                            </telerik:RadMenuItem.Icon>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Name="ContextMenuEdit" Header="Termin bearbeiten" Command="{Binding EditCommand, Source={StaticResource ContextMenueDataModel}}" CommandParameter="{Binding Menu.UIElement.SelectedAppointments, RelativeSource={RelativeSource Self}}" Click="FabaContextMenue_Click">
                            <telerik:RadMenuItem.Icon>
                                <Image Source="/monatsmatrixWPF;component/img/bearbeiten.png"></Image>
                            </telerik:RadMenuItem.Icon>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Name="ContextMenuDelete" Header="Termin löschen" Command="{Binding DeleteCommand, Source={StaticResource ContextMenueDataModel}}" CommandParameter="{Binding Menu.UIElement.SelectedAppointments, RelativeSource={RelativeSource Self}}" Click="FabaContextMenue_Click">
                            <telerik:RadMenuItem.Icon>
                                <Image Source="/monatsmatrixWPF;component/img/loeschen.png"></Image>
                            </telerik:RadMenuItem.Icon>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem IsSeparator="True" />
                        <telerik:RadMenuItem Name="Group1" Header="Guppe 1">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Name="Group2" Header="Guppe 2">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Name="Group3" Header="Guppe 3">
                        </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                </telerik:RadContextMenu.ContextMenu>
            </scheduleView:RadScheduleView>

regards
rudi 


2 Answers, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 12 Jan 2012, 09:19 AM
Hi Rudolf,

Changes were made to the GroupHeaderContentTemplateSelector, so please replace your definition of the selector with the following:

<telerik:GroupHeaderTemplateSelector x:Key="GroupHeaderContentTemplateSelector">
            <telerik:GroupHeaderTemplateSelector.HorizontalTemplate>
                <DataTemplate>
                    <Border Background="#959595" Width="310" Margin="0 0 0 0">
                        <StackPanel Margin="5 5 5 5" Orientation="Horizontal">
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Group}" HorizontalAlignment="Left" Width="150"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="|"  HorizontalAlignment="Center" Width="10"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Name}"  HorizontalAlignment="Left" Width="150"/>
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </telerik:GroupHeaderTemplateSelector.HorizontalTemplate>
  
            <telerik:GroupHeaderTemplateSelector.VerticalTemplate>
                <DataTemplate>
                    <Border Background="#959595" Width="310" Margin="0 0 0 0">
                        <StackPanel Margin="5 5 5 5" Orientation="Horizontal">
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Group}" HorizontalAlignment="Left" Width="150"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="|"  HorizontalAlignment="Center" Width="10"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Name}"  HorizontalAlignment="Left" Width="150"/>
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </telerik:GroupHeaderTemplateSelector.VerticalTemplate>
        </telerik:GroupHeaderTemplateSelector>

I hope this will help solve the issue.


Regards,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Rudolf
Top achievements
Rank 1
answered on 12 Jan 2012, 09:23 AM
Thanks,
that worked
Tags
ScheduleView
Asked by
Rudolf
Top achievements
Rank 1
Answers by
Dani
Telerik team
Rudolf
Top achievements
Rank 1
Share this question
or