// namespace TestNs { partial class MyControl { #nullable enable annotations /// /// Defines the property. /// public static readonly global::Avalonia.StyledProperty WidthProperty = global::Avalonia.AvaloniaProperty.Register(nameof(Width), defaultValue: 100); public partial int Width { get => GetValue(WidthProperty); set => SetValue(WidthProperty, value); } #nullable restore annotations } }