If you create a CustomControl
in WPF, you should put your default Style
into a file named Generic.xaml
. The Framework looks into this file to find default Style
s for all CustomControl
objects and will give you that error if the file is missing.
You can find a fuller description from the 'Define and Use Shared Resources' section of the Control Authoring Overview page at MSDN.
You can find more exact help with creating a CustomControl
from the Try it: Create a custom WPF control page at MSDN.