2

So I have a WPF custom control library with a few controls.

Some of the controls are quite complex and need multiple files stuffed into their own folders. Namespaces also imitate the folder structure, so I have namespaces like SomeControl.SomeControl etc. Some controls are trivial with just one file in the top level folder. I think its all really ugly but I don't know whats not!

Any rule of thumbs when organizing a custom control library both folders and namespaces?

akjoshi
  • 15,374
  • 13
  • 103
  • 121
NVM
  • 5,442
  • 4
  • 41
  • 61

1 Answers1

2

Namespaces should not be named based on folder hierarchy but based on there functionality etc. -

The name chosen for a namespace should indicate the functionality made available by types in the namespace

have a look at this MSDN article for guidelines for naming Namespaces

Names of Namespaces: http://msdn.microsoft.com/en-us/library/ms229026.aspx

Other similar questions on SO -

namespace naming conventions

Good Namespace Naming Conventions

Community
  • 1
  • 1
akjoshi
  • 15,374
  • 13
  • 103
  • 121