Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions SukiUI/Controls/GroupBox.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,49 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:suki="https://github.com/kikipoulet/SukiUI">
<Design.PreviewWith>
<Border Width="800" Height="500" Margin="20">
<Border Width="500" Height="400" Margin="20">
<StackPanel Spacing="5">
<suki:GlassCard>
<suki:GroupBox BorderBrush="Black"
Foreground="Red"
FontWeight="ExtraBlack"
BorderThickness="5"
Header="Title"
Header="Title 1"
Content="Hello world 1!"/>
</suki:GlassCard>

<suki:GlassCard>
<suki:GroupBox BorderBrush="Black"
BorderThickness="5"
Header="Title"
Content="Hello world 2!"/>
Header="Title 2"
Content="Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! "/>
</suki:GlassCard>

<suki:GlassCard>
<suki:GroupBox BorderBrush="Black"
BorderThickness="5"
Header="Title 2"
Content="Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2! Hello world 2!"
TextBlock.TextWrapping="Wrap" />
</suki:GlassCard>
</StackPanel>
</Border>
</Design.PreviewWith>
<ControlTheme TargetType="suki:GroupBox" x:Key="SukiGroupBoxTheme">

<ControlTheme x:Key="SukiGroupBoxTheme" TargetType="suki:GroupBox">
<Setter Property="ClipToBounds" Value="False" />
<Setter Property="Template">
<ControlTemplate>
<Grid RowDefinitions="Auto, Auto, *">
<Grid RowDefinitions="Auto,Auto,*">
<ContentPresenter Grid.Row="0"
Name="PART_HeaderPresenter"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
Content="{TemplateBinding Header}">
Content="{TemplateBinding Header}"
TextWrapping="{TemplateBinding TextBlock.TextWrapping}"
TextTrimming="{TemplateBinding TextBlock.TextTrimming}">
<ContentPresenter.Styles>
<Style Selector="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource SukiLowText}" />
Expand All @@ -53,9 +66,15 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}" />
Content="{TemplateBinding Content}"
TextWrapping="{TemplateBinding TextBlock.TextWrapping}"
TextTrimming="{TemplateBinding TextBlock.TextTrimming}"/>
</Grid>
</ControlTemplate>
</Setter>
</ControlTheme>

<ControlTheme x:Key="{x:Type suki:GroupBox}"
BasedOn="{StaticResource SukiGroupBoxTheme}"
TargetType="suki:GroupBox" />
</ResourceDictionary>