2023-07-10 00:22:02 +08:00
|
|
|
<UserControl
|
|
|
|
x:Class="Semi.Avalonia.Demo.Pages.SelectableTextBlockDemo"
|
|
|
|
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"
|
2024-11-09 04:13:00 +08:00
|
|
|
d:DesignHeight="600"
|
2023-07-10 00:22:02 +08:00
|
|
|
d:DesignWidth="800"
|
|
|
|
mc:Ignorable="d">
|
|
|
|
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<StackPanel.Styles>
|
2024-11-09 04:13:00 +08:00
|
|
|
<Style Selector="Grid > SelectableTextBlock">
|
2023-07-10 00:22:02 +08:00
|
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
|
|
<Setter Property="Margin" Value="4" />
|
|
|
|
</Style>
|
|
|
|
</StackPanel.Styles>
|
|
|
|
<HeaderedContentControl
|
2023-08-29 23:46:57 +08:00
|
|
|
Width="400"
|
2023-07-10 00:22:02 +08:00
|
|
|
Height="400"
|
|
|
|
Margin="16"
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
Header="Default Theme"
|
|
|
|
Theme="{DynamicResource GroupBox}">
|
|
|
|
<Grid
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
ColumnDefinitions="Auto, *"
|
2024-11-09 04:13:00 +08:00
|
|
|
RowDefinitions="*,*,*,*,*,*,*,*,*,*,*">
|
|
|
|
<Grid.Styles>
|
|
|
|
<Style Selector="SelectableTextBlock">
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
|
|
<Setter Property="Margin" Value="4" />
|
|
|
|
</Style>
|
|
|
|
</Grid.Styles>
|
|
|
|
<SelectableTextBlock Grid.Row="0" Grid.Column="0">Classes</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="1" Grid.Column="0">-</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="2" Grid.Column="0">Secondary</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="3" Grid.Column="0">Tertiary</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="4" Grid.Column="0">Quaternary</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="5" Grid.Column="0">Success</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="6" Grid.Column="0">Warning</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="7" Grid.Column="0">Danger</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="8" Grid.Column="0">Mark</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="9" Grid.Column="0">Underline</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="10" Grid.Column="0">Delete</SelectableTextBlock>
|
2023-07-10 00:22:02 +08:00
|
|
|
|
2024-11-09 04:13:00 +08:00
|
|
|
<SelectableTextBlock Grid.Row="1" Grid.Column="1">Text</SelectableTextBlock>
|
2023-07-10 00:22:02 +08:00
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="2"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
Classes="Secondary">
|
|
|
|
Secondary
|
|
|
|
</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="3"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
Classes="Tertiary">
|
|
|
|
Tertiary
|
|
|
|
</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="4"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
Classes="Quaternary">
|
|
|
|
Quaternary
|
|
|
|
</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="5"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
2023-09-06 13:47:35 +08:00
|
|
|
Classes="Success">
|
|
|
|
Success
|
2023-07-10 00:22:02 +08:00
|
|
|
</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="6"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
2023-09-06 13:47:35 +08:00
|
|
|
Classes="Warning">
|
|
|
|
Warning
|
2023-07-10 00:22:02 +08:00
|
|
|
</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="7"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
2023-09-06 13:47:35 +08:00
|
|
|
Classes="Danger">
|
|
|
|
Danger
|
2023-07-10 00:22:02 +08:00
|
|
|
</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="8"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
Classes="Mark">
|
|
|
|
Default Mark
|
|
|
|
</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="9"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
Classes="Underline">
|
|
|
|
Underline
|
|
|
|
</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="10"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
Classes="Delete">
|
|
|
|
Delete
|
|
|
|
</SelectableTextBlock>
|
|
|
|
</Grid>
|
|
|
|
</HeaderedContentControl>
|
|
|
|
<HeaderedContentControl
|
2023-08-29 23:46:57 +08:00
|
|
|
Width="400"
|
2023-07-10 00:22:02 +08:00
|
|
|
Height="400"
|
|
|
|
Margin="16"
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
Header="Theme: TitleSelectableTextBlock"
|
|
|
|
Theme="{DynamicResource GroupBox}">
|
|
|
|
<Grid
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
ColumnDefinitions="Auto, *"
|
2024-11-09 04:13:00 +08:00
|
|
|
RowDefinitions="*,*,*,*,*,*,*">
|
|
|
|
<SelectableTextBlock Grid.Row="0" Grid.Column="0">Classes</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="1" Grid.Column="0">H1</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="2" Grid.Column="0">H2</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="3" Grid.Column="0">H3</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="4" Grid.Column="0">H4</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="5" Grid.Column="0">H5</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock Grid.Row="6" Grid.Column="0">H6</SelectableTextBlock>
|
2023-07-10 00:22:02 +08:00
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="1"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
Classes="H1"
|
|
|
|
Theme="{StaticResource TitleSelectableTextBlock}">
|
|
|
|
Header 1
|
|
|
|
</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="2"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
Classes="H2"
|
|
|
|
Theme="{StaticResource TitleSelectableTextBlock}">
|
|
|
|
Header 2
|
|
|
|
</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="3"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
Classes="H3"
|
|
|
|
Theme="{StaticResource TitleSelectableTextBlock}">
|
|
|
|
Header 3
|
|
|
|
</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="4"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
Classes="H4"
|
|
|
|
Theme="{StaticResource TitleSelectableTextBlock}">
|
|
|
|
Header 4
|
|
|
|
</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="5"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
Classes="H5"
|
|
|
|
Theme="{StaticResource TitleSelectableTextBlock}">
|
|
|
|
Header 5
|
|
|
|
</SelectableTextBlock>
|
|
|
|
<SelectableTextBlock
|
2024-11-09 04:13:00 +08:00
|
|
|
Grid.Row="6"
|
2023-07-10 00:22:02 +08:00
|
|
|
Grid.Column="1"
|
|
|
|
Classes="H6"
|
|
|
|
Theme="{StaticResource TitleSelectableTextBlock}">
|
|
|
|
Header 6
|
|
|
|
</SelectableTextBlock>
|
|
|
|
</Grid>
|
|
|
|
</HeaderedContentControl>
|
|
|
|
</StackPanel>
|
|
|
|
</ScrollViewer>
|
|
|
|
</UserControl>
|