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

DataTemplate in new RadPaneGroup

3 Answers 226 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 07 Sep 2012, 01:55 PM
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>

 

 

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Konstantina
Telerik team
answered on 10 Sep 2012, 10:56 AM
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.

0
Paul
Top achievements
Rank 1
answered on 01 Oct 2012, 10:04 PM
I created ticket 613046 to submit source code.
Thanks
0
Paul
Top achievements
Rank 1
answered on 02 Oct 2012, 09:40 PM
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>


Tags
Docking
Asked by
Paul
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Paul
Top achievements
Rank 1
Share this question
or