Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Expander > RadExpander and RadScheduler side by side

Answered RadExpander and RadScheduler side by side

Feed from this thread
  • Rappen avatar

    Posted on Mar 16, 2010 (permalink)

    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.
    Attached files

    Reply

  • Answer Boyan Boyan admin's avatar

    Posted on Mar 19, 2010 (permalink)

    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.

    Reply

  • Rappen avatar

    Posted on Mar 22, 2010 (permalink)

    Great - thank you for helping me out with the grid :)

    /Jonas

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Expander > RadExpander and RadScheduler side by side
Related resources for "RadExpander and RadScheduler side by side"

WPF Expander Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]