Which type of naming is better to use in XAML:
-
xmlns:inventoryControls="clr-namespace:Inventory.Components.Controls;assembly=Inventory.Components"Then use it like this:
<inventoryControls:AdvancedTextBox/> -
xmlns:ic="clr-namespace:Inventory.Components.Controls;assembly=Inventory.Components"Then use it like this:
<ic:AdvancedTextBox/>
If you recommend the second way please consider about duplicates in first letter of the namespaces for example may be I wana refere to “Inventory.Components” namespace.
This is the second approach problem example:
xmlns:inventoryControls="clr-namespace:Inventory.Components.Controls;assembly=Inventory.Components"
xmlns:inventoryComponents="clr-namespace:Inventory.Components;assembly=Inventory.Components"
Write either what you like better or what your team agrees is the better option.
My personal opinion is to use some shortening: In XAML, you have to always specify the namespace and writing the whole name every time causes long lines and doesn’t help readability much.
But that doesn’t mean you have to shorten to just the initials, especially if that causes conflicts. In your cause I would use
iCtrlsandiCompsoriControlsandiComponents.