How to extend a Control in Avalonia?
问题 I want to extend the default dropdown with some functionality. The custom dropdown should behave like a default dropdown in the .xaml file, so it should be possible to add items to it. Unfortunately, it does not seem to work like in WPF. That's my approach: MainWindow.xaml: (added the namespace) <local:myCustomDropDown> <DropDownItem>1</DropDownItem> <DropDownItem>2</DropDownItem> </local:myCustomDropDown> myCustomDropDown.xaml: <DropDown xmlns="https://github.com/avaloniaui" xmlns:x="http:/