chore: add avalonia Calendar demo.

This commit is contained in:
NaBian committed 2025-02-05 10:42:50 +08:00
1 parent 1f48e6106d
commit 98b67b3fd5
5 files changed
+289

No files matched your search

@@ -0,0 +1,23 @@
using Avalonia;
using Avalonia.Media;
namespace HandyControl.Controls;
public class TitleElement
{
public static readonly AttachedProperty<IBrush?> BackgroundProperty =
AvaloniaProperty.RegisterAttached<TitleElement, AvaloniaObject, IBrush?>("Background", inherits: true);
public static void SetBackground(AvaloniaObject element, IBrush? value) =>
element.SetValue(BackgroundProperty, value);
public static IBrush? GetBackground(AvaloniaObject element) => element.GetValue(BackgroundProperty);
public static readonly AttachedProperty<IBrush?> ForegroundProperty =
AvaloniaProperty.RegisterAttached<TitleElement, AvaloniaObject, IBrush?>("Foreground", inherits: true);
public static void SetForeground(AvaloniaObject element, IBrush? value) =>
element.SetValue(ForegroundProperty, value);
public static IBrush? GetForeground(AvaloniaObject element) => element.GetValue(ForegroundProperty);
}