Custom OrientedGroupHeaderContentTemplateSelector

2 posts, 0 answers
  1. Håkan
    Håkan avatar
    183 posts
    Member since:
    May 2011

    Posted 27 Jun 2011 Link to this post

    I have created a custom OrientedGroupHeaderContentTemplateSelector (code pasted below).
    But when I run it, the control is displayed for a second and then crashes with the error:
    Layout cycle detected, layout could not complete. I tried to comment out all templates inside it, with the same result.

    Strangely it worked for me last week.
    Any ideas?


    <telerik:OrientedGroupHeaderContentTemplateSelector x:Key="CustomGroupHeaderContentTemplateSelector">
                              <RotateTransform Angle="-90" />
                          <TextBlock Margin="2" Text="{Binding Name, StringFormat=MMMM}" VerticalAlignment="Center" />
                              <RotateTransform Angle="-90" />
                          <TextBlock Margin="2" Text="{Binding Name, StringFormat='dddd'}" />
                      <TextBlock Text="{Binding Name}" Width="150" TextAlignment="Center" TextWrapping="Wrap" />

  2. Yana
    Yana avatar
    4547 posts

    Posted 30 Jun 2011 Link to this post

    Hi Håkan,

    I guess that you've upgraded to Q2 Beta or an internal build, is this the case?  We've made some changes to GroupHeaderContentTemplateSelector recently, please check this online demo which demonstrates the needed approach.

    Basically you should create your custom OrientedGroupHeaderContentTemplateSelector class which inherits ScheduleViewDataTemplateSelector and override its SelectTemplate method.

    Hope this helps.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top