There is nothing you have to care about. Start to define control and the tab pages, add inner structure, but perhaps without names. Use Intellisense; it won't let you to do a mistake. Run it to make sure it works and look properly. Then thing which elements you need to access via code and add names as you need them —
unique names, the scope of uniqueness is your whole
Window
class. (The problem of your code is the lack of such uniqueness in names. Names become auto-generated class members — in case you did not get it yet :-).)
By the way, labels do not require names at all, unless you want to change their color, text, etc. dynamically in code, which I don't recommend.
Instead, they need binding with the labelled element, because main purpose of labels is to provide a keyboard shortcut (via underscore-prefixed hot key character) to a labelled element. For example:
<Label Target="{Binding ElementName=xyz}">_Abc;/Label>
where
xyz
is the name of your labelled
TextBox
, according the code sample in question.
Please see:
http://msdn.microsoft.com/en-us/library/system.windows.controls.label.aspx[
^].
—SA