OrientedGroupHeaderContentTemplateSelector does not work in Q3 anymore

3 posts, 0 answers
  1. Rudolf
    Rudolf avatar
    9 posts
    Member since:
    Jul 2012

    Posted 11 Jan 2012 Link to this post

    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. Dani
    Admin
    Dani avatar
    848 posts

    Posted 12 Jan 2012 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Rudolf
    Rudolf avatar
    9 posts
    Member since:
    Jul 2012

    Posted 12 Jan 2012 Link to this post

    Thanks,
    that worked
Back to Top