RadDocumentPane cannot be used as ItemTemplate of RadPaneGroup?

2 posts, 0 answers
  1. Timothy Liu
    Timothy Liu avatar
    6 posts
    Member since:
    Jan 2010

    Posted 06 Dec 2010 Link to this post

    Dear Telerik,

    RadPaneGroup inherited from ItemsControl and can contain a list of RadDocumentPane. I want to use RadDocumentPane as ItemTemplate of RadPaneGroup. The code is:

    <t:RadSplitContainer>
        <t:RadPaneGroup ItemsSource="{Binding WorkflowItems}">
            <t:RadPaneGroup.ItemTemplate>
                <DataTemplate>
                    <t:RadDocumentPane Header="{Binding Name}" Content="{Binding Workflow}">
                        <t:RadDocumentPane.ContentTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding}" />
                            </DataTemplate>
                        </t:RadDocumentPane.ContentTemplate>
                    </t:RadDocumentPane>
                </DataTemplate>
            </t:RadPaneGroup.ItemTemplate>
        </t:RadPaneGroup>
    </t:RadSplitContainer>

    There is no error when building and running. But the UI has problem. (See attached file)
    http://www.telerik.com/ClientsFiles/235713_ui-problem.png

    BTW: I just tried, use RadPane as ItemTemplate will cause the same problem.
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 09 Dec 2010 Link to this post

    Hello Timothy,

     This problem occurs because the pane and document pane should be an items of the group, but not part of the template of the item of the group. This way a pane is generated as an item of the group and inside its template is placed another pane. This is the reason why you observe this strange effect. From your code I see that you use the ItemsSource property of the PangeGroup, but this is not supported by the RadPaneGroup control. You could find more information about this on the following help article - http://www.telerik.com/help/wpf/not-supported-properties.html.

    Hope this helps!

    All the best,
    Miroslav Nedyalkov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
Back to Top