AttachedPropertyOwner.cs 520 B

1234567891011121314
  1. using System;
  2. using Avalonia.Controls;
  3. namespace Avalonia.Markup.Xaml.UnitTests.Xaml
  4. {
  5. public class AttachedPropertyOwner
  6. {
  7. public static readonly AttachedProperty<double> DoubleProperty =
  8. AvaloniaProperty.RegisterAttached<AttachedPropertyOwner, Control, double>("Double");
  9. public static double GetDouble(Control control) => control.GetValue(DoubleProperty);
  10. public static void SetDouble(Control control, double value) => control.SetValue(DoubleProperty, value);
  11. }
  12. }