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

RadExpander and RadScheduler side by side

2 Answers 84 Views
Expander
This is a migrated thread and some comments may be shown as answers.
Rappen
Top achievements
Rank 1
Rappen asked on 16 Mar 2010, 04:58 PM
Hi

I am having serious problems performing something that seems quite simple.
I want a RadScheduler filling the form, and a RadExpander to the right of it. When I expand the Expander, the Scheduler should decrease its size accordingly.
When I try this with the Expander on top, it works as intended, but when I put the expander to the right, the scheduler just will not stretch over the form. It stretches well vertically, but not horizontally.
I believe I have altered the directions etc on the components as I should, but without any luck.

This is my very small form:
<Page x:Class="RadControlsWpfBrowserApp2.Page1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="Page1" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">  
    <Grid> 
        <StackPanel Orientation="Horizontal">  
            <telerik:RadScheduler Name="radScheduler1" HorizontalAlignment="Stretch" /> 
            <telerik:RadExpander ExpandDirection="Left" HorizontalAlignment="Right">  
                <telerik:RadExpander.Header> 
                    <Grid HorizontalAlignment="Stretch">  
                        <Grid.ColumnDefinitions> 
                            <ColumnDefinition Width="Auto" /> 
                            <ColumnDefinition Width="*" /> 
                        </Grid.ColumnDefinitions> 
                        <TextBlock Text="Header" /> 
                        <Rectangle Grid.Column="1" Margin="5,0,0,0" VerticalAlignment="Center" Height="2" Fill="Gray" /> 
                    </Grid> 
                </telerik:RadExpander.Header> 
                <StackPanel Orientation="Vertical" > 
                    <Ellipse Width="33" Height="33" Margin="5" Fill="Yellow" /> 
                    <Ellipse Width="33" Height="33" Margin="5" Fill="Blue" /> 
                    <Ellipse Width="33" Height="33" Margin="5" Fill="Red" /> 
                </StackPanel> 
            </telerik:RadExpander> 
        </StackPanel> 
    </Grid> 
</Page> 

See attached screen shot.

2 Answers, 1 is accepted

Sort by
0
Accepted
Boyan
Telerik team
answered on 19 Mar 2010, 12:45 PM
Hi Rappen,

The reason that RadScheduler is not shredding is that you have used StackPanel. Try to use Grid and it will behave like expected. Try this code:

<Grid>
       <Grid.ColumnDefinitions>
           <ColumnDefinition Width="*"/>
           <ColumnDefinition Width="Auto"/>
       </Grid.ColumnDefinitions>
       <telerik:RadScheduler Name="radScheduler1" Grid.Column="0" />
       <telerik:RadExpander ExpandDirection="Left" Grid.Column="1">
           <telerik:RadExpander.Header>
               <Grid HorizontalAlignment="Stretch">
                   <Grid.ColumnDefinitions>
                       <ColumnDefinition Width="Auto" />
                       <ColumnDefinition Width="*" />
                   </Grid.ColumnDefinitions>
                   <TextBlock Text="Header" />
                   <Rectangle Grid.Column="1" Margin="5,0,0,0" VerticalAlignment="Center" Height="2" Fill="Gray" />
               </Grid>
           </telerik:RadExpander.Header>
           <StackPanel Orientation="Vertical" >
               <Ellipse Width="33" Height="33" Margin="5" Fill="Yellow" />
               <Ellipse Width="33" Height="33" Margin="5" Fill="Blue" />
               <Ellipse Width="33" Height="33" Margin="5" Fill="Red" />
           </StackPanel>
       </telerik:RadExpander>
   </Grid>

Hope this helps. Let me know if you have more questions.
 

Regards,
Boyan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Rappen
Top achievements
Rank 1
answered on 22 Mar 2010, 01:08 PM
Great - thank you for helping me out with the grid :)

/Jonas
Tags
Expander
Asked by
Rappen
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Rappen
Top achievements
Rank 1
Share this question
or