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