you have to override the DefaultStyleKey metadata like below, to indicate you have defined the style in Generic.xaml
DefaultStyleKeyProperty.OverrideMetadata(typeof(TestItemsControl), new FrameworkPropertyMetadata(typeof(TestItemsControl)));
Add this code inside the static constructor of your control