Which GroupBox control would you recommend for Silverlight?

Everyone seems to have their own GroupBox control for Silverlight. Which one would you recommend.

+4
source share
2 answers

You can just stick with the regular HeaderedContentControl from the Silverlight Toolkit and style it to look like a group box:

Groupbox

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:t="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"> <Style x:Key="GroupBox" TargetType="t:HeaderedContentControl"> <Setter Property="BorderBrush" Value="LightGray" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Background" Value="White" /> <Setter Property="Foreground" Value="Black" /> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="VerticalContentAlignment" Value="Stretch"/> <Setter Property="Padding" Value="4" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="t:HeaderedContentControl"> <Grid Background="{TemplateBinding Background}"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition/> </Grid.RowDefinitions> <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4" Margin="0,8,0,0" Grid.RowSpan="2" /> <s:Label Background="{TemplateBinding Background}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" HorizontalAlignment="Left" Margin="8,0,0,0" Grid.Row="0" /> <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Grid.Row="1" /> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary> 
+4
source

Hi, I am using Contrib Silvelight ... the management functions are very good and there are free ones.

Website: http://silverlightcontrib.codeplex.com/

You only need to download the Binaries binary libraries - Silverlight Contrib 2010.1.0 and add the dll as a link to the silverlight project.

+1
source

Source: https://habr.com/ru/post/1315461/


All Articles