Sunday, January 31, 2010

GroupBox control for Silverlight3

GroupBox control is not available in Silverlight 3, but you can create GroupBox control using following XAML.

<Border CornerRadius="10" Background="AliceBlue" BorderBrush="Black" BorderThickness="1" Margin="10,10,10,10" Width="400" x:Name="Test">
            <StackPanel>
                <Border Margin="20,-10,0,0" Background="AliceBlue" HorizontalAlignment="Left">
                    <TextBlock Text="User Setting" Margin="10,0,10,0" FontWeight="Bold"></TextBlock>
                </Border>
              <!-- Put your content -->
            </StackPanel>
        </Border>
In above XAML you can replace <!-- Put your content –> with your data inside groupbox .

For Example :

<StackPanel>
            <TextBox>
</StackPanel>

Let me know your comment on this.

3 comments:

Anonymous said...

thanks dude..works gr8

Anonymous said...

Worked like a charm! Thanks!

Anonymous said...

Nice one... works great..