---
title: "What is the difference between X:name and x:key?"  
description: "What is the difference between X:name and x:key?"  
author: "Sumit Kesarwani"  
published: 2013-09-04  
updated: 2020-09-21  
canonical: https://www.mindstick.com/interview/1803/what-is-the-difference-between-x-name-and-x-key  
category: "wpf"  
tags: ["wpf"]  
reading_time: 1 minute  

---

# What is the difference between X:name and x:key?

X:name idetifies a UIElment in XAML Tree

X:Key identifies objects in resources section, can be accessed by resourceDictionary

## Answers

### Answer by Sumit Kesarwani

X:name idetifies a UIElment in XAML Tree

X:Key identifies objects in resources section, can be accessed by resourceDictionary


---

Original Source: https://www.mindstick.com/interview/1803/what-is-the-difference-between-x-name-and-x-key

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
