Proper usage of x:Name vs. Name
-
Monday, February 13, 2012 9:14 AM
A lot of Controls, if not all, have a property 'Name'. In Xaml when is it ok to use 'Name' and when is it necessary (or at least desirable) to use 'x:Name'?
All Replies
-
Monday, February 13, 2012 10:19 AM
Discussed here:
-
Monday, February 13, 2012 12:24 PM
Hi,
it depends on the base class of the control. Some controls doesn't have the 'Name' property so they are named through 'x:Name' instead of 'Name'. I would recommend that you always use 'x:Name'.
-
Monday, February 13, 2012 4:57 PM
Thanks!
-
Monday, February 13, 2012 4:57 PM
Thanks.

