feat: Add Rate styles and demos.
This commit is contained in:
1 parent
4d5f453895
commit
db0ced2f00
8 files changed
+685
-1
No files matched your search
@@ -0,0 +1,35 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
x:Class="HandyControlDemo.UserControl.RateDemo"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<TransitioningContentControl>
|
||||
<StackPanel Margin="32"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Width="190">
|
||||
<hc:Rate Value="2" />
|
||||
<hc:Rate Value="5"
|
||||
Count="6"
|
||||
Margin="0,16,0,0"
|
||||
Foreground="{DynamicResource SuccessBrush}" />
|
||||
<hc:Rate DefaultValue="3"
|
||||
IsReadOnly="True"
|
||||
AllowHalf="True"
|
||||
Margin="0,16,0,0"
|
||||
Foreground="{DynamicResource WarningBrush}" />
|
||||
<hc:Rate DefaultValue="1"
|
||||
AllowClear="False"
|
||||
AllowHalf="True"
|
||||
Margin="0,16,0,0"
|
||||
Foreground="{DynamicResource DangerBrush}"
|
||||
Icon="{StaticResource LoveGeometry}" />
|
||||
<hc:Rate Value="4.5"
|
||||
AllowHalf="True"
|
||||
ShowText="True"
|
||||
Margin="0,16,0,0"
|
||||
Foreground="{DynamicResource DangerBrush}"
|
||||
Icon="{StaticResource LoveGeometry}" />
|
||||
</StackPanel>
|
||||
</TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace HandyControlDemo.UserControl;
|
||||
|
||||
public partial class RateDemo : Avalonia.Controls.UserControl
|
||||
{
|
||||
public RateDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user