feat: hide header related features if header is null.

This commit is contained in:
rabbitism
2024-06-23 20:36:03 +08:00
parent 44d0700119
commit 2367aaccaa

View File

@@ -21,12 +21,18 @@
<ControlTheme x:Key="{x:Type u:FormGroup}" TargetType="u:FormGroup">
<Setter Property="Template">
<ControlTemplate TargetType="u:FormGroup">
<StackPanel Margin="0 28 0 0">
<ContentPresenter Content="{TemplateBinding Header}" FontWeight="Bold" FontSize="18" />
<StackPanel>
<ContentPresenter
Margin="0,28,0,0"
Content="{TemplateBinding Header}"
FontSize="18"
FontWeight="Bold"
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Header, Converter={x:Static ObjectConverters.IsNotNull}}" />
<Rectangle
Height="1"
Margin="0,8"
HorizontalAlignment="Stretch"
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Header, Converter={x:Static ObjectConverters.IsNotNull}}"
Fill="{DynamicResource SemiColorBorder}" />
<ItemsPresenter ItemsPanel="{TemplateBinding ItemsPanel}" />
</StackPanel>