RadPanel layout issues

6 posts, 0 answers
  1. Sam
    Sam avatar
    67 posts
    Member since:
    Jun 2011

    Posted 22 Sep 2011 Link to this post


    Hi, I'm having some problems with this layout scenario as per the example code below:

    <UserControl x:Class="RadPanelBarHeight.MainPage"
            mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
        <Grid x:Name="LayoutRoot">
     
            <telerik:RadPanelBar VerticalAlignment="Stretch" ExpandMode="Multiple">
                <telerik:RadPanelBarItem Header="Test 1" IsExpanded="True" Height="100">
                    <TextBlock Text="TEST" Height="90" />
                </telerik:RadPanelBarItem>
                <telerik:RadPanelBarItem Header="Test 2" IsExpanded="True">
                    <TextBlock Text="TEST" Height="90" />
                </telerik:RadPanelBarItem>
                <telerik:RadPanelBarItem Header="Test 3" IsExpanded="True">
                    <TextBlock Text="TEST" Height="90" />
                </telerik:RadPanelBarItem>       
            </telerik:RadPanelBar>

        </Grid>
    </UserControl>

    The panel bar correctly fits 100% of available height, but the display becomes buggy if one of the items has a fixed height and the others don't.

    What we ideally want is for the layout to respect the fixed height items, and divide the remaining height between items that don't have a height specified, while maintaining the PanelBar look and feel.

    Is there a way to enable the PanelBar control to work in this manner? If not, is there another Telerik control that would provide this behaviour?

    Thanks for your help.

    Sam
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 28 Sep 2011 Link to this post

    Hi Sam,

     Could you please try the following modifications to your snippet and let us know if it fits in your scenario ?

    <telerik:RadPanelBar VerticalAlignment="Stretch" ExpandMode="Multiple" Width="300">
              <telerik:RadPanelBarItem Height="100"
                                       Header="Test 1"
                                       IsExpanded="True"
                                       VerticalAlignment="Top">
                  <TextBlock Height="90" Text="TEST" />
              </telerik:RadPanelBarItem>
              <telerik:RadPanelBarItem Header="Test 2" IsExpanded="True" VerticalAlignment="Stretch">
                  <TextBlock Height="90" Text="TEST" />
              </telerik:RadPanelBarItem>
              <telerik:RadPanelBarItem Header="Test 3" IsExpanded="True" VerticalAlignment="Stretch">
                  <TextBlock Height="90" Text="TEST" />
              </telerik:RadPanelBarItem>
          </telerik:RadPanelBar>
    Thank you in advance for your cooperation.Regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Sam
    Sam avatar
    67 posts
    Member since:
    Jun 2011

    Posted 28 Sep 2011 Link to this post

    Hi Petar,

    That doesn't work for us unfortunately - the panel bar items still start out equally spaced on the screen, then the top item doesn't collapse properly.

    This is the exact behaviour we are looking for:

    - Fixed height items should be respected, but only when expanded, otherwise they should collapse to the header size as per the other items. It's OK for  the item to take up 100% height if it is the only expanded item however, so that the other collapsed items are at the bottom of the screen.

    - Dynamic height items should take up the remaining space as per the current behaviour

    I don't imagine this is possible to do just through XAML - is there a method to customize the layout behaviour of the control in code to allow for this specific scenario?
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 03 Oct 2011 Link to this post

    Hi Sam,

     Yes, it appears that this desired behavior cannot be achieved easily only by XAML code. We could create a feature request for you to meet this requirement. You will be able to vote for it in order to increase its development priority. Is this suitable for you ?

    All the best,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Sam
    Sam avatar
    67 posts
    Member since:
    Jun 2011

    Posted 02 Nov 2011 Link to this post

    Hi Peter, yes this would be a very desirable feature for us, please let me know when it is added so I can vote on it.

    Thanks,

    Sam
  7. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 07 Nov 2011 Link to this post

    Hi Sam,

     We created a feature request in this PITS item. Now you are able to vote for it and this way increase its development priority.

    Best wishes,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner