We are deciding if we should standardize on camelCase
or PascalCase
for XAML resource names.
Does anybody know if one style is usually favored over the other?
Does Microsoft have any convention for this?
For the record, we use camelCase
for fields (that includes WPF controls, in the very few cases where they are named)
To avoid religious arguments: I'm not looking for "this approach is BETTER than the other because..." responses. A good answer would include links to reference material and/or statistics.
For the x:Name
attribute, you should use camel casing, as this generally results in a field being created behind the scenes. Microsoft, doesn't really follow this though in their default Styles, as control templates are one exception where a backing field is not created.
For the x:Key
attribute, I've only ever seen pascal casing used. This includes in Microsoft's default Styles.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With