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

RadDocumentPane cannot be used as ItemTemplate of RadPaneGroup?

1 Answer 156 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Timothy Liu
Top achievements
Rank 1
Timothy Liu asked on 07 Dec 2010, 04:57 AM
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.

1 Answer, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 09 Dec 2010, 01:32 PM
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
Tags
Docking
Asked by
Timothy Liu
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or