!2 feat: ShowCaseItem添加边框&调整间距

Merge pull request !2 from ruoyu/ruoyu/ShowCaseItem
This commit is contained in:
pulsarware 2024-08-24 15:52:35 +00:00 committed by Gitee
commit 8b0b9f5ed6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 14 additions and 4 deletions

View File

@ -47,7 +47,16 @@ public class ShowCaseItem : ContentControl
Text = Description,
TextWrapping = TextWrapping.Wrap
});
Content = mainLayout;
var outerBorder = new Border()
{
BorderBrush = new SolidColorBrush(new Color(10, 5, 5, 5)),
BorderThickness = new Thickness(1),
Padding = new Thickness(20),
Child = mainLayout
};
Content = outerBorder;
}
protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)

View File

@ -33,13 +33,13 @@ public class ShowCasePanel : Control
_leftContainer = new StackPanel()
{
Orientation = Orientation.Vertical,
Spacing = 20,
Spacing = 10,
Margin = new Thickness(0, 0, 10, 0),
};
_rightContainer = new StackPanel()
{
Orientation = Orientation.Vertical,
Spacing = 20,
Spacing = 10,
};
mainLayout.Children.Add(_leftContainer);
mainLayout.Children.Add(_rightContainer);

View File

@ -28,6 +28,7 @@
Margin="0,20, 0, 0"
Padding="8"
FontSize="13"
HorizontalAlignment="Center"
Foreground="{TemplateBinding Foreground}"
Text="{Binding IconName}" />
</StackPanel>

View File

@ -22,7 +22,7 @@
<Setter Property="Margin" Value="0, 30, 0, 0" />
</Style>
<Style Selector="showcases|ShowCaseItem">
<Setter Property="Margin" Value="0, 0, 0, 50" />
<Setter Property="Margin" Value="0, 0, 0, 0" />
</Style>
</UserControl.Styles>
<Grid RowDefinitions="Auto, *">