PanelBarItem not showing expand/collapse icon on second level

2 posts, 0 answers
  1. Rod
    Rod avatar
    9 posts
    Member since:
    Jan 2013

    Posted 16 Aug Link to this post

    Can anyone tell me how to get the second level items to behave like the first level items? I would expect any level that has children to show an expander. In my example, the Send Items header should have an expander icon.

     

    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:Calendar="clr-namespace:Telerik.Windows.Controls.Calendar;assembly=Telerik.Windows.Controls.Input" xmlns:Chromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
    xmlns:Animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls.Navigation"
    x:Class="WpfApplication2.MainWindow"
    Title="MainWindow" Height="500" Width="525">
    <Window.Resources>
    </Window.Resources>
    <Grid>
    <telerik:RadPanelBar Margin="10" Width="280" Height="300">
    <telerik:RadPanelBarItem Header="Mail">
    <telerik:RadPanelBarItem Header="Personal Folder" />
    <telerik:RadPanelBarItem Header="Delete Items" />
    <telerik:RadPanelBarItem Header="Inbox" />
    <telerik:RadPanelBarItem Header="Send Items" >
    <telerik:RadPanelBarItem Header="Personal Folder" />
    <telerik:RadPanelBarItem Header="Delete Items" />
    <telerik:RadPanelBarItem Header="Inbox" />
    <telerik:RadPanelBarItem Header="Send Items" />
    <telerik:RadPanelBarItem Header="OutBox" />
    <telerik:RadPanelBarItem Header="Search Folders" />
    </telerik:RadPanelBarItem>
    <telerik:RadPanelBarItem Header="OutBox" />
    <telerik:RadPanelBarItem Header="Search Folders" />
    </telerik:RadPanelBarItem>
    <telerik:RadPanelBarItem Header="Contacts">
    <telerik:RadPanelBarItem Header="My Contacts" />
    <telerik:RadPanelBarItem Header="Address Cards" />
    <telerik:RadPanelBarItem Header="Phone List" />
    <telerik:RadPanelBarItem Header="Shared Contacts" />
    </telerik:RadPanelBarItem>
    <telerik:RadPanelBarItem Header="Tasks">
    <telerik:RadPanelBarItem Header="My Tasks" />
    <telerik:RadPanelBarItem Header="Shared Tasks" />
    <telerik:RadPanelBarItem Header="Active Tasks" />
    <telerik:RadPanelBarItem Header="Completed Tasks" />
    </telerik:RadPanelBarItem>
    <telerik:RadPanelBarItem Header="Notes">
    <telerik:RadPanelBarItem Header="My Notes" />
    <telerik:RadPanelBarItem Header="Notes List" />
    <telerik:RadPanelBarItem Header="Shared Notes" />
    <telerik:RadPanelBarItem Header="Archive" />
    </telerik:RadPanelBarItem>
    <telerik:RadPanelBarItem Header="Folders List">
    <telerik:RadPanelBarItem Header="My Client.Net" />
    <telerik:RadPanelBarItem Header="My Profile" />
    <telerik:RadPanelBarItem Header="My Support Tickets" />
    <telerik:RadPanelBarItem Header="My Licenses" />
    </telerik:RadPanelBarItem>
    </telerik:RadPanelBar>
    </Grid>
    </Window>

  2. Martin
    Admin
    Martin avatar
    1099 posts

    Posted 17 Aug Link to this post

    Hi Rod,

    The RadPanelBar supports only two levels of items. Any items defined deeper in the hierarchy won't be rendered. To achieve your requirement you can use RadTreeView instead of RadPanelBar, and style its nodes so that it looks as the panelbar. 

    Another approach is to use RadTreeView in the RadPanelBarItem that you want to be expandable. For example:
    <telerik:RadPanelBarItem>
        <telerik:RadPanelBarItem.Header>
            <telerik:RadTreeView>
                <telerik:RadTreeViewItem Header="Send Items">
                    <telerik:RadTreeViewItem Header="Personal Folder" />
                    <telerik:RadTreeViewItem Header="Delete Items" />
                    <telerik:RadTreeViewItem Header="Inbox" />
                    <telerik:RadTreeViewItem Header="Send Items" />
                    <telerik:RadTreeViewItem Header="OutBox" />
                    <telerik:RadTreeViewItem Header="Search Folders" />
                </telerik:RadTreeViewItem>
            </telerik:RadTreeView>
        </telerik:RadPanelBarItem.Header>
    </telerik:RadPanelBarItem>

    Regards,
    Martin
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top