C# wpf --- This is a "continuation" of c-sharpcorner.com/forums/how-do-change-the-background-color-on-one-listbox-item-continued-sharp4.
The
The attachable property 'Resources' was not found in type 'UserControl'.
There does not seem to be a solution. Thanks to the responses by Abhishek Yadav, Naimish Makwana, Tuhin Paul, and Rohini Parade.
Tuhin PaulPosted Mar 17, 2024, 6:19 PM
1. There's a common attached property called
FrameworkElement.Resourcesthat you can use on anyFrameworkElement(whichUserControlinherits from). This property allows you to define a localResourceDictionaryfor the UserControl.2. You can define resources in a separate
ResourceDictionaryfile and include it in your application or specific windows.