This is confusing to me. Why do we have to use x:Key= and x:Name= in place of key= and name=?
Where does this x come from?
Thanks!
The 'X' is an alias for an imported namespace (See the declaration of your XAML).
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
so when you type x, you use resources from that defined namespace. Actually, Name and Key are defined in the xaml namespace.
The name and key properties are defined within a namespace to avoid clashing with properties of the same name defined on the controls I believe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With