Click here to Skip to main content
15,897,718 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i`m trying to my project. this is one of my project

i`m trying to use Expander, and i already make it but i want to try another way if i click Expander button window Height increase and show Expander and re click Expander, Height Decrease

this is my Source



http://image.kilho.net/?pk=1217291[^]



C#
<Window x:Class="WpfApplication29.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="A" Height="308.421" Width="611.579" removed="#1F1F1F" WindowStyle="None" AllowsTransparency="True">
    <Grid Margin="0,0,2,0">
        <Grid removed="#FFC8EDFF" Height="20" Width="605" HorizontalAlignment="Left" VerticalAlignment="Top" MouseLeftButtonDown="Window_Move">
    
        </Grid>
       
        <Grid Margin="3,25,-3,0">
            <Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="219" Stroke="Black" VerticalAlignment="Top" Width="575" Margin="14,9,0,0"/>

            <Label Content="A :" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="28,19,0,0" FontSize="12"/>
            <TextBox HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="120" Margin="109,22,0,0"/>

            <Label Content="B " HorizontalAlignment="Left" VerticalAlignment="Top" Margin="28,59,0,0" FontSize="12"/>
            <TextBox HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="120" Margin="109,59,0,0"/>

            <Label Content="C :" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="28,100,0,0" FontSize="12"/>
            <TextBox HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="120" Margin="109,103,0,0"/>


            <Label Content="F :" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="307,19,0,0" FontSize="12"/>
            <TextBox HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="120" Margin="427,21,0,0"/>

            <Label Content="G :" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="307,59,0,0"/>
            <ComboBox HorizontalAlignment="Left" VerticalAlignment="Top" Width="120" Margin="439,59,0,0" FontSize="12"/>

            <Label Content="H :" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="307,100,0,0" FontSize="12"/>
            <ComboBox HorizontalAlignment="Left" VerticalAlignment="Top" Width="120" Margin="439,104,0,0"/>

            
            <Button Content="OK" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="500,244,0,0" FontSize="12"/>




            <Expander Header="Expander" Width="580" Height="280" Foreground="#FF2DAE34" ExpandDirection="Up" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="14,0,0,0">
                <Grid Width="580" Height="250"  removed="#FFE5E5E5" Margin="0,0,-2,0">
                    <Button Content="Apply" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="335,10,0,0"/>
                    <Button Content="Del" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="415,10,0,0"/>
                    <Button Content="Cancel" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="495,10,0,0"/>
                    <ListView HorizontalAlignment="Left" Height="188" VerticalAlignment="Top" Width="560" Margin="10,42,0,0">
                        <ListView.View>
                            <GridView>
                                <GridViewColumn Width="60" Header="A"/>
                                <GridViewColumn Width="60" Header="B"/>
                                <GridViewColumn Width="60" Header="C"/>
                                <GridViewColumn Width="80" Header="D"/>
                                <GridViewColumn Width="60" Header="E"/>
                                <GridViewColumn Width="80" Header="F"/>
                                <GridViewColumn Width="80" Header="G"/>
                                <GridViewColumn Width="80" Header="G"/>

                            </GridView>
                        </ListView.View>
                    </ListView>
                </Grid>



            </Expander>

        </Grid>
    </Grid>
</Window>



i want to use Expander to increase Layout Height and Collapse


but i couldn`t find it


is anyone know to use Expander to it? or Sample?
Posted
Updated 10-Jun-13 22:31pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900