if you name the file MyClass.designer.cs, it does.
There are a few βmagic namesβ that work (.xaml.cs is another one I think).
As an aside, I think partial classes should not be used for anything other than managing the generated code. If you find yourself going down this route because there is too much code to support in one file, you should reconsider why there is so much code and break it into smaller classes along the lines that you are going to break anyway (I'm not saying that this is your case, but this is just advice).
source share