Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# WPF
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[^]
 

 
<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 10-Jun-13 22:43pm
SgtSS336
Edited 10-Jun-13 23:31pm
(no name)26.5K
v2

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 504
1 Maciej Los 349
2 Kornfeld Eliyahu Peter 325
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,303
1 DamithSL 4,764
2 Maciej Los 4,306
3 Kornfeld Eliyahu Peter 3,914
4 Sergey Alexandrovich Kryukov 3,538


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 11 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100