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

RadChart and RadExpander Sharing space

2 Answers 50 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Dr.YSG
Top achievements
Rank 2
Dr.YSG asked on 29 Jan 2010, 04:47 PM
I have been trying to have a StackPanel which has two sub-elements:

1. A RadExpander
2. A RadChart

The idea is that when when the expander is closed, The Chart gets the free space, and when it opens up, the Chart is shoved down.

That is why I use the StackPanel

The issue is that I don't want the StackPanel to have a fixed Height (or width). But when I take off the Height, then the Chart grows to 600 in Height (even though it is set to Auto).

Grids solve the "fill available space issue), But no combination of nesting, *-Layout, AutoLayout or other techniques have allowed me to have the "push this control down" effect. With the GRID I always get the expander overlaying the RadChart (and hiding the title).


2 Answers, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 02 Feb 2010, 04:51 PM
Hi Dr.YSG,

The following setup works fine for me:

<Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <telerik:RadExpander>
            <Rectangle Fill="Pink" Height="300" />
        </telerik:RadExpander>
        <telerikChart:RadChart x:Name="RadChart1" Grid.Row="1" />
    </Grid>

Best,
Ves
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Dr.YSG
Top achievements
Rank 2
answered on 02 Feb 2010, 05:12 PM
Excellent. I have been trying all sorts of combinations of Auto, *, and nesting of Grids. I thought I had tried that one, But obviously not.

It is working for me for both Charts and RadGrids.. Thank you for helping me with this, it was a couple of weeks of naggling issues.
Tags
Chart
Asked by
Dr.YSG
Top achievements
Rank 2
Answers by
Ves
Telerik team
Dr.YSG
Top achievements
Rank 2
Share this question
or