Discussion resize Expander Control

  • Tuesday, October 23, 2012 6:07 AM
     
     

    how can we resize(Drag Up or Down with mouse) Expander control?

All Replies

  • Thursday, October 25, 2012 5:39 AM
    Moderator
     
     

    Hi, what do you mean Drag Up or Down with mouse with Expander control? Since I don't understand it very clear, I can't help you further. But you can resize Expander height with following code:

    <toolkit:Expander Height="150" HorizontalAlignment="Left" Margin="10,10,0,0" Name="expander1" VerticalAlignment="Top" Width="350" Background="LightBlue">
        <Button Content="increase expander height" Name="IncreaseBtn" Click="IncreaseBtn_Click"></Button>
    </toolkit:Expander>
            private void IncreaseBtn_Click(object sender, RoutedEventArgs e)
            {
                expander1.Height = expander1.ActualHeight + 100;
                expander1.Width = expander1.ActualWidth + 50;
            }

    Best Regards

  • Thursday, October 25, 2012 9:03 AM
     
     

    As in Windows Explorer we can mimize,maximize different sections(left,right,bottom) with mouse.

    same behavior I needed to achieve with Expander Control.

    It that making sense?

  • Thursday, October 25, 2012 11:08 AM
     
     

    When we set Curor type to SizeNS,corresponding behavior need to be done.
    (I am not sure whether it is making any sense).

    - Shwetank

  • Tuesday, November 06, 2012 5:09 AM
     
      Has Code

    hello Johnson,

    expander1.Height is NaN, so even if value is changed it does not reflect.

    any ideas?


    shwetank

  • Thursday, November 08, 2012 7:26 AM
    Moderator