
Header & Content are now invisible when set to null. SeparatorBorder is now influenced by BorderThickness. Background is no longer transparent. (cherry picked from commit 021ca978659bbb83fac8e4fb719473237f8a6b62)
163 lines
6.8 KiB
XML
163 lines
6.8 KiB
XML
<UserControl
|
|
x:Class="Semi.Avalonia.Demo.Pages.TextBlockDemo"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
d:DesignHeight="600"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d">
|
|
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
|
<StackPanel Orientation="Horizontal">
|
|
<StackPanel.Styles>
|
|
<Style Selector="Grid > TextBlock">
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="Margin" Value="4" />
|
|
</Style>
|
|
</StackPanel.Styles>
|
|
<HeaderedContentControl
|
|
Width="400"
|
|
Height="400"
|
|
Margin="16"
|
|
VerticalAlignment="Top"
|
|
Header="Default Theme"
|
|
Theme="{DynamicResource GroupBox}">
|
|
<Grid
|
|
VerticalAlignment="Top"
|
|
ColumnDefinitions="Auto, *"
|
|
RowDefinitions="*,*,*,*,*,*,*,*,*,*,*">
|
|
<TextBlock Grid.Row="0" Grid.Column="0">Classes</TextBlock>
|
|
<TextBlock Grid.Row="1" Grid.Column="0">-</TextBlock>
|
|
<TextBlock Grid.Row="2" Grid.Column="0">Secondary</TextBlock>
|
|
<TextBlock Grid.Row="3" Grid.Column="0">Tertiary</TextBlock>
|
|
<TextBlock Grid.Row="4" Grid.Column="0">Quaternary</TextBlock>
|
|
<TextBlock Grid.Row="5" Grid.Column="0">Success</TextBlock>
|
|
<TextBlock Grid.Row="6" Grid.Column="0">Warning</TextBlock>
|
|
<TextBlock Grid.Row="7" Grid.Column="0">Danger</TextBlock>
|
|
<TextBlock Grid.Row="8" Grid.Column="0">Mark</TextBlock>
|
|
<TextBlock Grid.Row="9" Grid.Column="0">Underline</TextBlock>
|
|
<TextBlock Grid.Row="10" Grid.Column="0">Delete</TextBlock>
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="1">Text</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
Classes="Secondary">
|
|
Secondary
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
Classes="Tertiary">
|
|
Tertiary
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="4"
|
|
Grid.Column="1"
|
|
Classes="Quaternary">
|
|
Quaternary
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="5"
|
|
Grid.Column="1"
|
|
Classes="Success">
|
|
Success
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="6"
|
|
Grid.Column="1"
|
|
Classes="Warning">
|
|
Warning
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="7"
|
|
Grid.Column="1"
|
|
Classes="Danger">
|
|
Danger
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="8"
|
|
Grid.Column="1"
|
|
Classes="Mark">
|
|
Default Mark
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="9"
|
|
Grid.Column="1"
|
|
Classes="Underline">
|
|
Underline
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="10"
|
|
Grid.Column="1"
|
|
Classes="Delete">
|
|
Delete
|
|
</TextBlock>
|
|
</Grid>
|
|
</HeaderedContentControl>
|
|
<HeaderedContentControl
|
|
Width="400"
|
|
Height="400"
|
|
Margin="16"
|
|
VerticalAlignment="Top"
|
|
Header="Theme: TitleTextBlock"
|
|
Theme="{DynamicResource GroupBox}">
|
|
<Grid
|
|
VerticalAlignment="Top"
|
|
ColumnDefinitions="Auto, *"
|
|
RowDefinitions="*,*,*,*,*,*,*">
|
|
<TextBlock Grid.Row="0" Grid.Column="0">Classes</TextBlock>
|
|
<TextBlock Grid.Row="1" Grid.Column="0">H1</TextBlock>
|
|
<TextBlock Grid.Row="2" Grid.Column="0">H2</TextBlock>
|
|
<TextBlock Grid.Row="3" Grid.Column="0">H3</TextBlock>
|
|
<TextBlock Grid.Row="4" Grid.Column="0">H4</TextBlock>
|
|
<TextBlock Grid.Row="5" Grid.Column="0">H5</TextBlock>
|
|
<TextBlock Grid.Row="6" Grid.Column="0">H6</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Classes="H1"
|
|
Theme="{StaticResource TitleTextBlock}">
|
|
Header 1
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
Classes="H2"
|
|
Theme="{StaticResource TitleTextBlock}">
|
|
Header 2
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
Classes="H3"
|
|
Theme="{StaticResource TitleTextBlock}">
|
|
Header 3
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="4"
|
|
Grid.Column="1"
|
|
Classes="H4"
|
|
Theme="{StaticResource TitleTextBlock}">
|
|
Header 4
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="5"
|
|
Grid.Column="1"
|
|
Classes="H5"
|
|
Theme="{StaticResource TitleTextBlock}">
|
|
Header 5
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="6"
|
|
Grid.Column="1"
|
|
Classes="H6"
|
|
Theme="{StaticResource TitleTextBlock}">
|
|
Header 6
|
|
</TextBlock>
|
|
</Grid>
|
|
</HeaderedContentControl>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</UserControl>
|