tags:

views:

159

answers:

3

My understanding of x:Name vs Name is that some controls have a Name property, that is basically the same as setting x:Name.

Is there an advantage to using Name when it is available over x:Name?

Here's my reference for understanding x:Name vs Name.

+2  A: 

"If Name is available as a property on the class, Name and x:Name can be used interchangeably as attributes, but an error will result if both are specified on the same element."

x:Name Attribute

In other words, it makes no difference which one you use; just don't use both on the same element.

Kyralessa
+1  A: 

For any that has stumbled upon this question ... here's is a very detailed answer. Thanks to Taylor L for pointing me in the right direction.

Chris Nicol
+2  A: 

You're safer using x:Name because it works all the time, where as Name depends on the particular control implementation.

Jim Wallace