some time since you asked this question... - what about your deployment now? Did you get it right?
Your question is a little confusing because you talk about a CustomControl - this is a special type in WPF: you derive controls with your own ControlTemplate (theme) from it - opposed to a UserControl where you compose existing controls together - far more likely in WPF). So I don't understand what you mean with "in code behind"...
Anyway, if your control worked on your developer pc(where all dependencies existed) it should be logical that the code doesn't need any change. You just didn't setup your runtime environment correctly.
In general: If you have a library with controls/functions your application needs, you have to deploy it to the target computer. Best way is to do this in an automated, repeatable, and controlled process - with a SETUP ;)
But before you can create a setup you have to understand how references and dependencies work on your target systems and for your programming platform and language/framework. It seems it could not do any harm if you spend some minutes reading MSDN on this topic? e.g. here
Managing Dependencies[
^]