// namespace TestNs { partial class MyControl { #nullable enable annotations /// /// Defines the property. /// public static readonly global::Avalonia.DirectProperty CountProperty = global::Avalonia.AvaloniaProperty.RegisterDirect(nameof(Count), static o => o.Count, static (o, v) => o.Count = v, unsetValue: -1); public partial int Count { get => field; set => SetAndRaise(CountProperty, ref field, value); } #nullable restore annotations } }