Tuesday 12 June 2012

How to use Expander Control in silverlight

   




<Grid Width="auto" Height="auto" x:Name="LayoutRoot" Background="White">   <Grid Background="#FFFCF2EF"  Width="auto" Height="auto"  x:Name="subash">

            <Grid.RowDefinitions>

                <RowDefinition Height="Auto" />

                <RowDefinition Height="auto" /> 

            </Grid.RowDefinitions>


            <toolkit:Expander Grid.RowSpan="1" Height="auto" HorizontalAlignment="Left" Margin="64,6,0,0" Name="expander1" VerticalAlignment="Top" Width="612" IsExpanded="False" Header="Chart1">

                <Grid Height="Auto" HorizontalAlignment="Stretch" Name="grid1" VerticalAlignment="Stretch" Width="Auto" AllowDrop="False">

                    <toolkit:Chart Height="230" HorizontalAlignment="Left" Name="chart1" Title="Chart Title" VerticalAlignment="Top" Width="380">

                        <toolkit:ColumnSeries DependentValuePath="X" IndependentValuePath="Y">

                            <toolkit:ColumnSeries.ItemsSource>

                                <PointCollection>

                                    <Point>1,10</Point>

                                    <Point>2,20</Point>

                                    <Point>3,30</Point>

                                    <Point>4,40</Point>

                                </PointCollection>

                            </toolkit:ColumnSeries.ItemsSource>

                        </toolkit:ColumnSeries>

                    </toolkit:Chart>

                </Grid>

            </toolkit:Expander>


            <toolkit:Expander Grid.Row="2" Height="auto" HorizontalAlignment="Left" Margin="64,6,0,0" Name="expander2" VerticalAlignment="Top" Width="612" Header="Chart2">

                <Grid Height="auto" HorizontalAlignment="Stretch" Name="grid2" VerticalAlignment="Stretch" Width="Auto" >

                    <toolkit:Chart  Height="193" HorizontalAlignment="Left"  Name="chart2" Title="Chart Title" VerticalAlignment="Top" Width="330">

                        <toolkit:ColumnSeries DependentValuePath="X" IndependentValuePath="Y">

                            <toolkit:ColumnSeries.ItemsSource>

                                <PointCollection>

                                    <Point>1,10</Point>

                                    <Point>2,20</Point>

                                    <Point>3,30</Point>

                                    <Point>4,40</Point>

                                </PointCollection>

                            </toolkit:ColumnSeries.ItemsSource>

                        </toolkit:ColumnSeries>

                    </toolkit:Chart>

                </Grid>

            </toolkit:Expander>

        </Grid>    

    </Grid>

No comments:

Post a Comment