Automatically expand the PanelBar item

2 posts, 0 answers
  1. Arun
    Arun avatar
    6 posts
    Member since:
    Sep 2014

    Posted 10 Nov 2014 Link to this post

    I am using Rad PanelBar.I want to show all item on load the page.That means need to automatically expand the items.

    Here is my code

    <telerik:RadPanelBar BorderBrush="#F0F0F0" Margin="-66,57,1195,-3">
              <telerik:RadPanelBarItem  DropPosition="Inside" Header="DEVICE" Background="#FF42545E" BorderBrush="#FF42545E" FontSize="14" >
                  <telerik:RadPanelBarItem  Header="Add new Device" Foreground="Black" Cursor="Hand" FontSize="14" Margin="0,10,0,0" />
                  <telerik:RadPanelBarItem Header="Print" Foreground="Black" Cursor="Hand" FontSize="14" Margin="0,10,0,0" />
                  <telerik:RadPanelBarItem Header="De-allocate All" Foreground="Black" Cursor="Hand" FontSize="14" Margin="0,10,0,0" />
              </telerik:RadPanelBarItem>
          </telerik:RadPanelBar>
    How can we do this..Can any one help?
  2. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 13 Nov 2014 Link to this post

    Hi Arun,

    You can expand a RadPanelBarItem by setting its IsExpanded property to True. In order to expand all items on load of the application you can create an implicit Style and set the IsExpanded property for all items.

    Here is an example:
    <Window.Resources>
      <
    Style TargetType="telerik:RadPanelBarItem" BasedOn="{StaticResource RadPanelBarItemStyle}">
        <Setter Property="IsExpanded" Value="True" />
      </Style>
    </Window.Resources>

    Please give it a try and let me know if it works for you.

    Regards,
    Martin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top