Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • So this name has to be unique across all controls? I can access any control with its name no matter how nested it is? Commented Mar 15, 2011 at 19:35
  • 1
    Still doesn't work for some reason. I didn't change the definition of x btw. Commented Mar 15, 2011 at 20:07
  • 2
    No, It doesn't work for me. I have tried x:Name, but it doesn't work. Commented Jul 9, 2013 at 5:15
  • 2
    MIght be good to note that by default, simply setting x:Name won't make that control accessible EVERYWHERE in your project, just within the code-behind specifically for the xml where the x:Name is defined. Commented Jun 17, 2016 at 0:33
  • To make it visible in whole namespace, use a cast to your special Window1: var mw = (Window1)Application.Current.MainWindow;, then you can call: mw.EffectsListView.Width = 10; Commented Jun 4, 2018 at 13:01