tags:

views:

20

answers:

1

In my projects I have a lot of UserControls which contain other controls. Most of them are bound to a ViewModel, however at times I access them also directly from the code-behind to add special functionality or sometimes also only to save the ViewModel.

If I do this, I do it always directly via the member variable of the control.

Is this a mistake? Are there reasons to do this not so but to go the way over FindName? I have to note that it is pretty sure that never a designer will graphically “optimize” these applications.

+2  A: 

If you mean you access the control via the name defined in the XAML:

<TextBox Name="SomeName" ... />

Then that is the right way to go about it.

ChrisF