![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Access App.Current from within a Control? I'm subclassing Listview and would like to have that code access an Application Resource so that each instance of the control doesn't have its own copy of the resource to save memory. But the following: App.Current.Resources["MyResource"]; Will not work in this class. It says App does not exist in the current context. Is there a way around this and still allow the control to be instantiated in XAML? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Access App.Current from within a Control? Hi, The class name is Application and Current is static property. The code has to be Application.Current.Resource[...] -- HTH Stoitcho Goutsev (100) <wackyphill@yahoo.com> wrote in message news:1162906054.572237.22540@m73g2000cwd.googlegroups.com... > I'm subclassing Listview and would like to have that code access an > Application Resource so that each instance of the control doesn't have > its own copy of the resource to save memory. But the following: > > App.Current.Resources["MyResource"]; > > Will not work in this class. It says App does not exist in the current > context. Is there a way around this and still allow the control to be > instantiated in XAML? > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Access App.Current from within a Control? Man, I feel dumb. Hey thanks Stoitcho I appreciate it. |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| can't open access control editor. Access is denied | General Discussion | |||
| Folder Access Denied, Unable to display current owner. | Vista General | |||
| UAC (user access control) | Vista file management | |||
| how do I keep powershells current directory and dotnets current directory in sync | PowerShell | |||