Merge pull request #3 from irihitech/taglabel

Label as Tag
This commit is contained in:
Dong Bin 2022-12-11 00:38:28 +08:00 committed by GitHub
commit c1e32b17c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 530 additions and 0 deletions

View File

@ -17,5 +17,8 @@
<TabItem Header="RadioButton">
<pages:RadioButtonDemo />
</TabItem>
<TabItem Header="Label">
<pages:LabelDemo />
</TabItem>
</TabControl>
</Window>

View File

@ -0,0 +1,78 @@
<UserControl
x:Class="Semi.Avalonia.Demo.Pages.LabelDemo" 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="450"
d:DesignWidth="800" mc:Ignorable="d">
<StackPanel
Width="500" Margin="20"
HorizontalAlignment="Left" Spacing="20">
<StackPanel.Styles>
<Style Selector="Label">
<Setter Property="Margin" Value="4" />
</Style>
</StackPanel.Styles>
<WrapPanel>
<Label Theme="{StaticResource TagLabel}">Label</Label>
<Label Classes="Large" Theme="{StaticResource TagLabel}">Large Label</Label>
<Label Classes="Circle" Theme="{StaticResource TagLabel}">Circle Label</Label>
<Label Classes="Large Circle" Theme="{StaticResource TagLabel}">Large Circle Label</Label>
</WrapPanel>
<WrapPanel>
<Label Classes="Amber" Theme="{StaticResource TagLabel}">Amber</Label>
<Label Classes="Blue" Theme="{StaticResource TagLabel}">Blue</Label>
<Label Classes="Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
<Label Classes="Green" Theme="{StaticResource TagLabel}">Green</Label>
<Label Classes="Grey" Theme="{StaticResource TagLabel}">Grey</Label>
<Label Classes="Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
<Label Classes="LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
<Label Classes="LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
<Label Classes="Lime" Theme="{StaticResource TagLabel}">Lime</Label>
<Label Classes="Orange" Theme="{StaticResource TagLabel}">Orange</Label>
<Label Classes="Pink" Theme="{StaticResource TagLabel}">Pink</Label>
<Label Classes="Purple" Theme="{StaticResource TagLabel}">Purple</Label>
<Label Classes="Red" Theme="{StaticResource TagLabel}">Red</Label>
<Label Classes="Teal" Theme="{StaticResource TagLabel}">Teal</Label>
<Label Classes="Violet" Theme="{StaticResource TagLabel}">Violet</Label>
<Label Classes="Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
<Label Classes="White" Theme="{StaticResource TagLabel}">White</Label>
</WrapPanel>
<WrapPanel>
<Label Classes="Ghost Amber" Theme="{StaticResource TagLabel}">Amber</Label>
<Label Classes="Ghost Blue" Theme="{StaticResource TagLabel}">Blue</Label>
<Label Classes="Ghost Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
<Label Classes="Ghost Green" Theme="{StaticResource TagLabel}">Green</Label>
<Label Classes="Ghost Grey" Theme="{StaticResource TagLabel}">Grey</Label>
<Label Classes="Ghost Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
<Label Classes="Ghost LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
<Label Classes="Ghost LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
<Label Classes="Ghost Lime" Theme="{StaticResource TagLabel}">Lime</Label>
<Label Classes="Ghost Orange" Theme="{StaticResource TagLabel}">Orange</Label>
<Label Classes="Ghost Pink" Theme="{StaticResource TagLabel}">Pink</Label>
<Label Classes="Ghost Purple" Theme="{StaticResource TagLabel}">Purple</Label>
<Label Classes="Ghost Red" Theme="{StaticResource TagLabel}">Red</Label>
<Label Classes="Ghost Teal" Theme="{StaticResource TagLabel}">Teal</Label>
<Label Classes="Ghost Violet" Theme="{StaticResource TagLabel}">Violet</Label>
<Label Classes="Ghost Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
<Label Classes="Ghost White" Theme="{StaticResource TagLabel}">White</Label>
</WrapPanel>
<WrapPanel>
<Label Classes="Solid Amber" Theme="{StaticResource TagLabel}">Amber</Label>
<Label Classes="Solid Blue" Theme="{StaticResource TagLabel}">Blue</Label>
<Label Classes="Solid Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
<Label Classes="Solid Green" Theme="{StaticResource TagLabel}">Green</Label>
<Label Classes="Solid Grey" Theme="{StaticResource TagLabel}">Grey</Label>
<Label Classes="Solid Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
<Label Classes="Solid LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
<Label Classes="Solid LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
<Label Classes="Solid Lime" Theme="{StaticResource TagLabel}">Lime</Label>
<Label Classes="Solid Orange" Theme="{StaticResource TagLabel}">Orange</Label>
<Label Classes="Solid Pink" Theme="{StaticResource TagLabel}">Pink</Label>
<Label Classes="Solid Purple" Theme="{StaticResource TagLabel}">Purple</Label>
<Label Classes="Solid Red" Theme="{StaticResource TagLabel}">Red</Label>
<Label Classes="Solid Teal" Theme="{StaticResource TagLabel}">Teal</Label>
<Label Classes="Solid Violet" Theme="{StaticResource TagLabel}">Violet</Label>
<Label Classes="Solid Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
<Label Classes="Solid White" Theme="{StaticResource TagLabel}">White</Label>
</WrapPanel>
</StackPanel>
</UserControl>

View File

@ -0,0 +1,18 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
public partial class LabelDemo : UserControl
{
public LabelDemo()
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@ -1,4 +1,79 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Design.PreviewWith>
<StackPanel
Width="500" Margin="20"
HorizontalAlignment="Left" Spacing="20">
<StackPanel.Styles>
<Style Selector="Label">
<Setter Property="Margin" Value="4" />
</Style>
</StackPanel.Styles>
<WrapPanel>
<Label Theme="{StaticResource TagLabel}">Label</Label>
<Label Classes="Large" Theme="{StaticResource TagLabel}">Large Label</Label>
<Label Classes="Circle" Theme="{StaticResource TagLabel}">Circle Label</Label>
<Label Classes="Large Circle" Theme="{StaticResource TagLabel}">Large Circle Label</Label>
</WrapPanel>
<WrapPanel>
<Label Classes="Amber" Theme="{StaticResource TagLabel}">Amber</Label>
<Label Classes="Blue" Theme="{StaticResource TagLabel}">Blue</Label>
<Label Classes="Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
<Label Classes="Green" Theme="{StaticResource TagLabel}">Green</Label>
<Label Classes="Grey" Theme="{StaticResource TagLabel}">Grey</Label>
<Label Classes="Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
<Label Classes="LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
<Label Classes="LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
<Label Classes="Lime" Theme="{StaticResource TagLabel}">Lime</Label>
<Label Classes="Orange" Theme="{StaticResource TagLabel}">Orange</Label>
<Label Classes="Pink" Theme="{StaticResource TagLabel}">Pink</Label>
<Label Classes="Purple" Theme="{StaticResource TagLabel}">Purple</Label>
<Label Classes="Red" Theme="{StaticResource TagLabel}">Red</Label>
<Label Classes="Teal" Theme="{StaticResource TagLabel}">Teal</Label>
<Label Classes="Violet" Theme="{StaticResource TagLabel}">Violet</Label>
<Label Classes="Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
<Label Classes="White" Theme="{StaticResource TagLabel}">White</Label>
</WrapPanel>
<WrapPanel>
<Label Classes="Ghost Amber" Theme="{StaticResource TagLabel}">Amber</Label>
<Label Classes="Ghost Blue" Theme="{StaticResource TagLabel}">Blue</Label>
<Label Classes="Ghost Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
<Label Classes="Ghost Green" Theme="{StaticResource TagLabel}">Green</Label>
<Label Classes="Ghost Grey" Theme="{StaticResource TagLabel}">Grey</Label>
<Label Classes="Ghost Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
<Label Classes="Ghost LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
<Label Classes="Ghost LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
<Label Classes="Ghost Lime" Theme="{StaticResource TagLabel}">Lime</Label>
<Label Classes="Ghost Orange" Theme="{StaticResource TagLabel}">Orange</Label>
<Label Classes="Ghost Pink" Theme="{StaticResource TagLabel}">Pink</Label>
<Label Classes="Ghost Purple" Theme="{StaticResource TagLabel}">Purple</Label>
<Label Classes="Ghost Red" Theme="{StaticResource TagLabel}">Red</Label>
<Label Classes="Ghost Teal" Theme="{StaticResource TagLabel}">Teal</Label>
<Label Classes="Ghost Violet" Theme="{StaticResource TagLabel}">Violet</Label>
<Label Classes="Ghost Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
<Label Classes="Ghost White" Theme="{StaticResource TagLabel}">White</Label>
</WrapPanel>
<WrapPanel>
<Label Classes="Solid Amber" Theme="{StaticResource TagLabel}">Amber</Label>
<Label Classes="Solid Blue" Theme="{StaticResource TagLabel}">Blue</Label>
<Label Classes="Solid Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
<Label Classes="Solid Green" Theme="{StaticResource TagLabel}">Green</Label>
<Label Classes="Solid Grey" Theme="{StaticResource TagLabel}">Grey</Label>
<Label Classes="Solid Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
<Label Classes="Solid LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
<Label Classes="Solid LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
<Label Classes="Solid Lime" Theme="{StaticResource TagLabel}">Lime</Label>
<Label Classes="Solid Orange" Theme="{StaticResource TagLabel}">Orange</Label>
<Label Classes="Solid Pink" Theme="{StaticResource TagLabel}">Pink</Label>
<Label Classes="Solid Purple" Theme="{StaticResource TagLabel}">Purple</Label>
<Label Classes="Solid Red" Theme="{StaticResource TagLabel}">Red</Label>
<Label Classes="Solid Teal" Theme="{StaticResource TagLabel}">Teal</Label>
<Label Classes="Solid Violet" Theme="{StaticResource TagLabel}">Violet</Label>
<Label Classes="Solid Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
<Label Classes="Solid White" Theme="{StaticResource TagLabel}">White</Label>
</WrapPanel>
</StackPanel>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type Label}" TargetType="Label">
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockDefaultForeground}" />
<Setter Property="Label.FontSize" Value="{DynamicResource TextBlockFontSize}" />
@ -78,4 +153,250 @@
<Setter Property="Label.FontSize" Value="{DynamicResource TextBlockTitleH6FontSize}" />
</Style>
</ControlTheme>
<!-- Light, Ghost, Solid. -->
<!-- Shape: Square,Circle. Default is Square -->
<!-- Size: Small, Large. Default is Small -->
<!-- Color: Amber, Blue, Cyan, Green, Grey, Indigo, LightBlue, LightGreen, Lime, Orange, Pink, Purple, Red, Teal, Violet, Yellow, White. Default is Grey -->
<ControlTheme x:Key="TagLabel" TargetType="Label">
<Setter Property="Label.BorderThickness" Value="{DynamicResource LabelTagBorderThickness}" />
<Setter Property="Label.MinHeight" Value="{DynamicResource LabelTagSmallHeight}" />
<Setter Property="Label.CornerRadius" Value="{DynamicResource LabelTagSquareCornerRadius}" />
<Setter Property="Label.HorizontalAlignment" Value="Left" />
<Setter Property="Label.UseLayoutRounding" Value="False" />
<Setter Property="Label.VerticalAlignment" Value="Center" />
<Setter Property="Label.Padding" Value="{DynamicResource LabelTagSmallPadding}" />
<Setter Property="Label.FontSize" Value="{DynamicResource LabelTagFontSize}" />
<Setter Property="Template">
<ControlTemplate TargetType="Label">
<ContentPresenter
Name="PART_ContentPresenter"
MinWidth="{TemplateBinding MinWidth}"
MinHeight="{TemplateBinding MinHeight}"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}"
FontSize="{TemplateBinding FontSize}"
RecognizesAccessKey="True" />
</ControlTemplate>
</Setter>
<Style Selector="^.Large">
<Setter Property="Label.Padding" Value="{DynamicResource LabelTagLargePadding}" />
<Setter Property="Label.MinHeight" Value="{DynamicResource LabelTagLargeHeight}" />
</Style>
<Style Selector="^.Circle">
<Setter Property="Label.CornerRadius" Value="{DynamicResource LabelTagCircleCornerRadius}" />
</Style>
<Style Selector="^">
<Setter Property="Label.BorderBrush" Value="Transparent" />
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightGreyBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightGreyForeground}" />
<Style Selector="^.Amber">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightAmberBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightAmberForeground}" />
</Style>
<Style Selector="^.Blue">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightBlueBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightBlueForeground}" />
</Style>
<Style Selector="^.Cyan">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightCyanBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightCyanForeground}" />
</Style>
<Style Selector="^.Green">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightGreenBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightGreenForeground}" />
</Style>
<Style Selector="^.Grey">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightGreyBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightGreyForeground}" />
</Style>
<Style Selector="^.Indigo">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightIndigoBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightIndigoForeground}" />
</Style>
<Style Selector="^.LightBlue">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightLightBlueBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightLightBlueForeground}" />
</Style>
<Style Selector="^.LightGreen">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightLightGreenBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightLightGreenForeground}" />
</Style>
<Style Selector="^.Lime">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightLimeBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightLimeForeground}" />
</Style>
<Style Selector="^.Orange">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightOrangeBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightOrangeForeground}" />
</Style>
<Style Selector="^.Pink">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightPinkBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightPinkForeground}" />
</Style>
<Style Selector="^.Purple">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightPurpleBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightPurpleForeground}" />
</Style>
<Style Selector="^.Red">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightRedBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightRedForeground}" />
</Style>
<Style Selector="^.Teal">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightTealBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightTealForeground}" />
</Style>
<Style Selector="^.Violet">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightVioletBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightVioletForeground}" />
</Style>
<Style Selector="^.Yellow">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightYellowBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightYellowForeground}" />
</Style>
<Style Selector="^.White">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagLightWhiteBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightWhiteForeground}" />
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagLightWhiteBorderBrush}" />
</Style>
</Style>
<Style Selector="^.Ghost">
<Setter Property="Label.Background" Value="Transparent" />
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagLightGreyBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagLightGreyForeground}" />
<Style Selector="^.Amber">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostAmberBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostAmberForeground}" />
</Style>
<Style Selector="^.Blue">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostBlueBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostBlueForeground}" />
</Style>
<Style Selector="^.Cyan">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostCyanBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostCyanForeground}" />
</Style>
<Style Selector="^.Green">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostGreenBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostGreenForeground}" />
</Style>
<Style Selector="^.Grey">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostGreyBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostGreyForeground}" />
</Style>
<Style Selector="^.Indigo">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostIndigoBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostIndigoForeground}" />
</Style>
<Style Selector="^.LightBlue">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostLightBlueBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostLightBlueForeground}" />
</Style>
<Style Selector="^.LightGreen">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostLightGreenBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostLightGreenForeground}" />
</Style>
<Style Selector="^.Lime">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostLimeBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostLimeForeground}" />
</Style>
<Style Selector="^.Orange">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostOrangeBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostOrangeForeground}" />
</Style>
<Style Selector="^.Pink">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostPinkBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostPinkForeground}" />
</Style>
<Style Selector="^.Purple">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostPurpleBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostPurpleForeground}" />
</Style>
<Style Selector="^.Red">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostRedBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostRedForeground}" />
</Style>
<Style Selector="^.Teal">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostTealBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostTealForeground}" />
</Style>
<Style Selector="^.Violet">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostVioletBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostVioletForeground}" />
</Style>
<Style Selector="^.Yellow">
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostYellowBorderBrush}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostYellowForeground}" />
</Style>
<Style Selector="^.White">
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostWhiteForeground}" />
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostWhiteBorderBrush}" />
</Style>
</Style>
<Style Selector="^.Solid">
<Setter Property="Label.BorderBrush" Value="Transparent" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagSolidForeground}" />
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidGreyBackground}" />
<Style Selector="^.Amber">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidAmberBackground}" />
</Style>
<Style Selector="^.Blue">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidBlueBackground}" />
</Style>
<Style Selector="^.Cyan">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidCyanBackground}" />
</Style>
<Style Selector="^.Green">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidGreenBackground}" />
</Style>
<Style Selector="^.Grey">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidGreyBackground}" />
</Style>
<Style Selector="^.Indigo">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidIndigoBackground}" />
</Style>
<Style Selector="^.LightBlue">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidLightBlueBackground}" />
</Style>
<Style Selector="^.LightGreen">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidLightGreenBackground}" />
</Style>
<Style Selector="^.Lime">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidLimeBackground}" />
</Style>
<Style Selector="^.Orange">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidOrangeBackground}" />
</Style>
<Style Selector="^.Pink">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidPinkBackground}" />
</Style>
<Style Selector="^.Purple">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidPurpleBackground}" />
</Style>
<Style Selector="^.Red">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidRedBackground}" />
</Style>
<Style Selector="^.Teal">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidTealBackground}" />
</Style>
<Style Selector="^.Violet">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidVioletBackground}" />
</Style>
<Style Selector="^.Yellow">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidYellowBackground}" />
</Style>
<Style Selector="^.White">
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagSolidWhiteForeground}" />
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagSolidWhiteBorderBrush}" />
<Setter Property="Label.Background" Value="{DynamicResource LabelTagSolidWhiteBackground}" />
</Style>
</Style>
</ControlTheme>
</ResourceDictionary>

View File

@ -0,0 +1,109 @@
<ResourceDictionary
xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
<!-- Typography related resources are combined with TextBlock -->
<Thickness x:Key="LabelTagBorderThickness">1</Thickness>
<Thickness x:Key="LabelTagSmallPadding">8 2</Thickness>
<Thickness x:Key="LabelTagLargePadding">8 4</Thickness>
<sys:Double x:Key="LabelTagSmallHeight">20</sys:Double>
<sys:Double x:Key="LabelTagLargeHeight">24</sys:Double>
<sys:Double x:Key="LabelTagFontSize">12</sys:Double>
<CornerRadius x:Key="LabelTagSquareCornerRadius">3</CornerRadius>
<CornerRadius x:Key="LabelTagCircleCornerRadius">9999</CornerRadius>
<SolidColorBrush x:Key="LabelTagLightAmberForeground" Color="#784606" />
<SolidColorBrush x:Key="LabelTagLightAmberBackground" Opacity="0.15" Color="#F0B114" />
<SolidColorBrush x:Key="LabelTagLightBlueForeground" Color="#003D8F" />
<SolidColorBrush x:Key="LabelTagLightBlueBackground" Opacity="0.15" Color="#0077FA" />
<SolidColorBrush x:Key="LabelTagLightCyanForeground" Color="#004D5B" />
<SolidColorBrush x:Key="LabelTagLightCyanBackground" Opacity="0.15" Color="#05A4B6" />
<SolidColorBrush x:Key="LabelTagLightGreenForeground" Color="#1B5924" />
<SolidColorBrush x:Key="LabelTagLightGreenBackground" Opacity="0.15" Color="#3BB346" />
<SolidColorBrush x:Key="LabelTagLightGreyForeground" Color="#2E3238" />
<SolidColorBrush x:Key="LabelTagLightGreyBackground" Opacity="0.15" Color="#6B7075" />
<SolidColorBrush x:Key="LabelTagLightIndigoForeground" Color="#1F2878" />
<SolidColorBrush x:Key="LabelTagLightIndigoBackground" Opacity="0.15" Color="#3F51B5" />
<SolidColorBrush x:Key="LabelTagLightLightBlueForeground" Color="#004B83" />
<SolidColorBrush x:Key="LabelTagLightLightBlueBackground" Opacity="0.15" Color="#0095EE" />
<SolidColorBrush x:Key="LabelTagLightLightGreenForeground" Color="#395B1B" />
<SolidColorBrush x:Key="LabelTagLightLightGreenBackground" Opacity="0.15" Color="#7BB63C" />
<SolidColorBrush x:Key="LabelTagLightLimeForeground" Color="#9BD100" />
<SolidColorBrush x:Key="LabelTagLightLimeBackground" Opacity="0.15" Color="#486800" />
<SolidColorBrush x:Key="LabelTagLightOrangeForeground" Color="#7E3100" />
<SolidColorBrush x:Key="LabelTagLightOrangeBackground" Opacity="0.15" Color="#FC8800" />
<SolidColorBrush x:Key="LabelTagLightPinkForeground" Color="#7E053A" />
<SolidColorBrush x:Key="LabelTagLightPinkBackground" Opacity="0.15" Color="#E91E63" />
<SolidColorBrush x:Key="LabelTagLightPurpleForeground" Color="#5C0F75" />
<SolidColorBrush x:Key="LabelTagLightPurpleBackground" Opacity="0.15" Color="#9E28B3" />
<SolidColorBrush x:Key="LabelTagLightRedForeground" Color="#8E0805" />
<SolidColorBrush x:Key="LabelTagLightRedBackground" Opacity="0.15" Color="#F93920" />
<SolidColorBrush x:Key="LabelTagLightTealForeground" Color="#005955" />
<SolidColorBrush x:Key="LabelTagLightTealBackground" Opacity="0.15" Color="#00B3A1" />
<SolidColorBrush x:Key="LabelTagLightVioletForeground" Color="#6A3AC7" />
<SolidColorBrush x:Key="LabelTagLightVioletBackground" Opacity="0.15" Color="#361C8A" />
<SolidColorBrush x:Key="LabelTagLightYellowForeground" Color="#7D6A00" />
<SolidColorBrush x:Key="LabelTagLightYellowBackground" Opacity="0.15" Color="#FAC800" />
<SolidColorBrush x:Key="LabelTagLightWhiteForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="LabelTagLightWhiteBackground" Opacity="0.15" Color="#FFFFFF" />
<SolidColorBrush x:Key="LabelTagLightWhiteBorderBrush" Color="#C6CACD" />
<SolidColorBrush x:Key="LabelTagGhostAmberBorderBrush" Color="#F3C341" />
<SolidColorBrush x:Key="LabelTagGhostAmberForeground" Color="#F0B114" />
<SolidColorBrush x:Key="LabelTagGhostBlueBorderBrush" Color="#3295FB" />
<SolidColorBrush x:Key="LabelTagGhostBlueForeground" Color="#0077FA" />
<SolidColorBrush x:Key="LabelTagGhostCyanBorderBrush" Color="#2CB8C5" />
<SolidColorBrush x:Key="LabelTagGhostCyanForeground" Color="#05A4B6" />
<SolidColorBrush x:Key="LabelTagGhostGreenBorderBrush" Color="#5AC262" />
<SolidColorBrush x:Key="LabelTagGhostGreenForeground" Color="#3BB346" />
<SolidColorBrush x:Key="LabelTagGhostGreyBorderBrush" Color="#888D92" />
<SolidColorBrush x:Key="LabelTagGhostGreyForeground" Color="#6B7075" />
<SolidColorBrush x:Key="LabelTagGhostIndigoBorderBrush" Color="#5E6FC4" />
<SolidColorBrush x:Key="LabelTagGhostIndigoForeground" Color="#3F51B5" />
<SolidColorBrush x:Key="LabelTagGhostLightBlueBorderBrush" Color="#30ACF1" />
<SolidColorBrush x:Key="LabelTagGhostLightBlueForeground" Color="#0095EE" />
<SolidColorBrush x:Key="LabelTagGhostLightGreenBorderBrush" Color="#93C55B" />
<SolidColorBrush x:Key="LabelTagGhostLightGreenForeground" Color="#7BB63C" />
<SolidColorBrush x:Key="LabelTagGhostLimeBorderBrush" Color="#A7DA2C" />
<SolidColorBrush x:Key="LabelTagGhostLimeForeground" Color="#9BD100" />
<SolidColorBrush x:Key="LabelTagGhostOrangeBorderBrush" Color="#FDA633" />
<SolidColorBrush x:Key="LabelTagGhostOrangeForeground" Color="#FC8800" />
<SolidColorBrush x:Key="LabelTagGhostPinkBorderBrush" Color="#ED487B" />
<SolidColorBrush x:Key="LabelTagGhostPinkForeground" Color="#E91E63" />
<SolidColorBrush x:Key="LabelTagGhostPurpleBorderBrush" Color="#B449C2" />
<SolidColorBrush x:Key="LabelTagGhostPurpleForeground" Color="#9E28B3" />
<SolidColorBrush x:Key="LabelTagGhostRedBorderBrush" Color="#FA664C" />
<SolidColorBrush x:Key="LabelTagGhostRedForeground" Color="#F93920" />
<SolidColorBrush x:Key="LabelTagGhostTealBorderBrush" Color="#27C2B0" />
<SolidColorBrush x:Key="LabelTagGhostTealForeground" Color="#00B3A1" />
<SolidColorBrush x:Key="LabelTagGhostVioletBorderBrush" Color="#885BD2" />
<SolidColorBrush x:Key="LabelTagGhostVioletForeground" Color="#6A3AC7" />
<SolidColorBrush x:Key="LabelTagGhostYellowBorderBrush" Color="#FBDA32" />
<SolidColorBrush x:Key="LabelTagGhostYellowForeground" Color="#FAC800" />
<SolidColorBrush x:Key="LabelTagGhostWhiteBorderBrush" Color="#C6CACD" />
<SolidColorBrush x:Key="LabelTagGhostWhiteForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="LabelTagSolidForeground" Color="#FFFFFF" />
<SolidColorBrush x:Key="LabelTagSolidAmberBackground" Color="#F0B114" />
<SolidColorBrush x:Key="LabelTagSolidBlueBackground" Color="#0077FA" />
<SolidColorBrush x:Key="LabelTagSolidCyanBackground" Color="#05A4B6" />
<SolidColorBrush x:Key="LabelTagSolidGreenBackground" Color="#3BB346" />
<SolidColorBrush x:Key="LabelTagSolidGreyBackground" Color="#6B7075" />
<SolidColorBrush x:Key="LabelTagSolidIndigoBackground" Color="#3F51B5" />
<SolidColorBrush x:Key="LabelTagSolidLightBlueBackground" Color="#0095EE" />
<SolidColorBrush x:Key="LabelTagSolidLightGreenBackground" Color="#7BB63C" />
<SolidColorBrush x:Key="LabelTagSolidLimeBackground" Color="#9BD100" />
<SolidColorBrush x:Key="LabelTagSolidOrangeBackground" Color="#FC8800" />
<SolidColorBrush x:Key="LabelTagSolidPinkBackground" Color="#E91E63" />
<SolidColorBrush x:Key="LabelTagSolidPurpleBackground" Color="#9E28B3" />
<SolidColorBrush x:Key="LabelTagSolidRedBackground" Color="#F93920" />
<SolidColorBrush x:Key="LabelTagSolidTealBackground" Color="#00B3A1" />
<SolidColorBrush x:Key="LabelTagSolidVioletBackground" Color="#6A3AC7" />
<SolidColorBrush x:Key="LabelTagSolidYellowBackground" Color="#FAC800" />
<SolidColorBrush x:Key="LabelTagSolidWhiteBackground" Color="#FFFFFF" />
<SolidColorBrush x:Key="LabelTagSolidWhiteBorderBrush" Color="#C6CACD" />
<SolidColorBrush x:Key="LabelTagSolidWhiteForeground" Color="#1C1F23" />
</ResourceDictionary>

View File

@ -4,6 +4,7 @@
<!-- Controls -->
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Button.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/CheckBox.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Label.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/RadioButton.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/TextBlock.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Window.axaml" />