Take the 2-minute tour ×  What's the difference between x:Key
and x:Name in WPF?  Not sure what the true difference is.
share|improve this question @Alastair, the question you listed
as a possible dupe is unrelated to this. –  Josh Dec 13 '10 at
3:39 how is it a duplicate? The other question talks about Name
vs Type. This question is about Key vs Name. –  jalf Dec 13 '10
at 3:40 My mistake, I misread the "possible dupe" question.
Apologies. –  Alastair Pitts Dec 13 '10 at 3:51  2 Answers 2  up
vote 28 down vote accepted  Although they are used for similar
purposes, they are not interchangeable. x:Key is used for items
that are being added as values to a dictionary, most often for
styles and other resources that are being added to a
ResourceDictionary. When setting the x:Key attribute, there is
actually no corresponding property on the object or even an
attached dependency property being set. It is simply used by the
XAML processor to know what key to use when calling
Dictionary.Add.  x:Name is a bit more com