feat: support multiple classes, improve unit tests.

This commit is contained in:
rabbitism
2024-11-06 23:22:17 +08:00
parent 74e190b6a4
commit c57bf10511
9 changed files with 88 additions and 14 deletions

View File

@@ -3,6 +3,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="https://irihi.tech/ursa"
xmlns:helpers="clr-namespace:Irihi.Avalonia.Shared.Helpers;assembly=Irihi.Avalonia.Shared"
mc:Ignorable="d" d:DesignWidth="800"
d:DesignHeight="450"
x:Class="HeadlessTest.Ursa.Controls.DialogTests.StyleClassTests.TestWindow"
@@ -13,6 +14,11 @@
<Setter Property="Content" Value="CUSTOM"/>
</Style>
</Style>
<Style Selector="u|DefaultDialogControl.Custom2">
<Style Selector="^ /template/ Button#PART_OKButton">
<Setter Property="helpers:ClassHelper.Classes" Value="Warning Small" />
</Style>
</Style>
</u:UrsaWindow.Styles>
Welcome to Avalonia!