DataTemplate in new RadPaneGroup

4 posts, 1 answers
  1. Paul
    Paul avatar
    42 posts
    Member since:
    Jan 2012

    Posted 07 Sep 2012 Link to this post

    Hello, I am using the RadDocking to manage a collection of panes.  I have a DataTemple with a EditableContentControl to allow modification of header text.  This works quite well with the exception of when a pane is moved to a new group.  When a RadPane is removed from the initial RadPaneGroup and placed in a new location, and I add a new pane, all RadPanes in the new RadPaneGroup do not utilize the DataTemplate defined in the initial.  Is there some resolution to this?
    You can see from the XAML below that I am binding the ItemSource for the RadPaneGroup to a collection using an extension.  The newly greated RadPaneGroup does correctly bind to the collection of panes so I had assumed that the DataTemplate too would be applied.

    Thanks

    Paul

    <Grid>
       <TelerikDocking:RadDocking>
         <TelerikDocking:RadDocking.DocumentHost>
           <TelerikDocking:RadSplitContainer>
             <TelerikDocking:RadPaneGroup Extension:PaneGroupExtensions.ItemsSource="{Binding Panes, Source={StaticResource QueueWindowViewModel}}">
               <Extension:PaneGroupExtensions.ItemHeaderTemplate>
                 <DataTemplate>
                   <Grid>
                     <Root:EditableContentControl Content="{Binding HeaderText, Mode=TwoWay}"/>
                   </Grid>
                 </DataTemplate>
               </Extension:PaneGroupExtensions.ItemHeaderTemplate>
             </TelerikDocking:RadPaneGroup> 
           </TelerikDocking:RadSplitContainer>
         </TelerikDocking:RadDocking.DocumentHost>
       </TelerikDocking:RadDocking>
    </Grid>

     

     

     

  2. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 10 Sep 2012 Link to this post

    Hello Paul,

    Could you please review the attached project - it illustrates how to use the extension and set a DataTemplate to the Item and the Header. If you could modify it, so the issue is reproduced it will be very helpful for tracking down the source of the issue.
    Please keep in mind, that this is not a supported feature out-of-the-box, just a work-around we have suggested, so some limitations might be present.

    Kind regards,
    Konstantina
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Paul
    Paul avatar
    42 posts
    Member since:
    Jan 2012

    Posted 01 Oct 2012 Link to this post

    I created ticket 613046 to submit source code.
    Thanks
  5. Paul
    Paul avatar
    42 posts
    Member since:
    Jan 2012

    Posted 02 Oct 2012 Link to this post

    The following is the response from Telerik:
    All that is needed to be done is to add the ItemHeaderTemplate as an implicit style, so that it can apply to the newly generated PaneGroups.

    In my XAML I had incorrectly attempted this.  The correct syntax is:

    <Style TargetType="Telerik:RadPaneGroup">

      <Setter Property="Extension:PaneGroupExtensions.ItemHeaderTemplate">

        <Setter.Value>

          <DataTemplate>

            <Grid>

              <Root:EditableContentControl Content="{Binding HeaderText, Mode=TwoWay}" />

          </Grid>

        </DataTemplate>

      </Setter.Value>

     </Setter>

    </Style>


Back to Top