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

RadPanel layout issues

5 Answers 63 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 23 Sep 2011, 01:16 AM

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

5 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 28 Sep 2011, 12:24 PM
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 >>

0
Sam
Top achievements
Rank 1
answered on 29 Sep 2011, 12:45 AM
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?
0
Petar Mladenov
Telerik team
answered on 03 Oct 2011, 03:49 PM
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 >>

0
Sam
Top achievements
Rank 1
answered on 03 Nov 2011, 03:24 AM
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
0
Petar Mladenov
Telerik team
answered on 07 Nov 2011, 03:50 PM
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 >>

Tags
PanelBar
Asked by
Sam
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Sam
Top achievements
Rank 1
Share this question
or