mirror of
https://gitee.com/chinware/atomui.git
synced 2024-11-29 18:38:16 +08:00
!7 ShowCaseItem样式添加圆角&部分文案错误&Separator使用AtomUI的
Merge pull request !7 from ruoyu/ruoyu/changeShowCaseItem
This commit is contained in:
commit
a2752934aa
@ -15,37 +15,29 @@ public class ShowCaseItem : ContentControl
|
||||
private void SetupUi()
|
||||
{
|
||||
var mainLayout = new StackPanel();
|
||||
var showCaseTitle = new StackPanel
|
||||
var showCaseTitle = new AtomUI.Controls.Separator()
|
||||
{
|
||||
Orientation = Orientation.Horizontal,
|
||||
Margin = new Thickness(0, 30, 0, 0)
|
||||
Title = Title,
|
||||
TitlePosition = AtomUI.Controls.SeparatorTitlePosition.Left,
|
||||
FontWeight = FontWeight.Bold,
|
||||
};
|
||||
showCaseTitle.Children.Add(new Label()
|
||||
{
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
HorizontalAlignment = HorizontalAlignment.Left,
|
||||
Content = Title,
|
||||
FontWeight = FontWeight.Bold
|
||||
});
|
||||
showCaseTitle.Children.Add(new Separator()
|
||||
{
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
HorizontalAlignment = HorizontalAlignment.Stretch,
|
||||
Margin = new Thickness(10, 0),
|
||||
Width = 200,
|
||||
BorderBrush = new SolidColorBrush(Colors.Gray),
|
||||
});
|
||||
|
||||
if (Content is Control contentControl) {
|
||||
LogicalChildren.Remove(contentControl);
|
||||
mainLayout.Children.Add(contentControl);
|
||||
}
|
||||
|
||||
|
||||
mainLayout.Children.Add(new Border
|
||||
{
|
||||
Height = 10,
|
||||
Background = Brushes.Transparent
|
||||
});
|
||||
mainLayout.Children.Add(showCaseTitle);
|
||||
mainLayout.Children.Add(new TextBlock()
|
||||
{
|
||||
Text = Description,
|
||||
TextWrapping = TextWrapping.Wrap
|
||||
TextWrapping = TextWrapping.Wrap,
|
||||
Margin = new Thickness(0, 10, 0, 0)
|
||||
});
|
||||
|
||||
var outerBorder = new Border()
|
||||
@ -53,7 +45,8 @@ public class ShowCaseItem : ContentControl
|
||||
BorderBrush = new SolidColorBrush(new Color(10, 5, 5, 5)),
|
||||
BorderThickness = new Thickness(1),
|
||||
Padding = new Thickness(20),
|
||||
Child = mainLayout
|
||||
Child = mainLayout,
|
||||
CornerRadius = new CornerRadius(8)
|
||||
};
|
||||
|
||||
Content = outerBorder;
|
||||
|
@ -54,7 +54,7 @@
|
||||
Title="Size"
|
||||
Description="AtomUI supports three sizes of buttons: small, default and large.
|
||||
If a large or small button is desired, set the size property to either large or small respectively. Omit the size property for a button with the default size.">
|
||||
<DockPanel Margin="0, 0, 0, 0" Height="300">
|
||||
<DockPanel Margin="0, 0, 0, 0">
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" DockPanel.Dock="Top">
|
||||
<TextBlock VerticalAlignment="Center">Expand direction:</TextBlock>
|
||||
<atom:OptionButtonGroup ButtonStyle="Outline" Name="ButtonSizeTypeOptionGroup">
|
||||
|
@ -87,7 +87,6 @@
|
||||
Check all
|
||||
</atom:CheckBox>
|
||||
</StackPanel>
|
||||
<Separator Width="200" />
|
||||
<WrapPanel Margin="0, 20, 0, 0">
|
||||
<atom:CheckBox x:Name="AppleCheckBox"
|
||||
IsChecked="{Binding AppleCheckedStatus}"
|
||||
|
@ -73,7 +73,7 @@
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
|
||||
</TextBlock>
|
||||
<atom:Separator Title="Left Text" TitlePosition="Right"/>
|
||||
<atom:Separator Title="Right Text" TitlePosition="Right"/>
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
|
||||
</TextBlock>
|
||||
|
Loading…
Reference in New Issue
Block a user