January 18, 2012

Accessing Resources from a child window

Moving a Resources node from the Main xaml page to a ChildWindow xaml page gave me an error:

The property ‘Resources’ does not exist on the type ‘ChildWindow’ in the XML namespace ‘clr-namespace:System.Windows.Controls; assembly=System.Windows.Controls’.

Fixed it by following the post on: http://forums.silverlight.net/t/131273.aspx/1

Changed the node from:

<UserControl.Resources />

to:

<controls:ChildWindow.Resources />

Thanks Wilfred Pinto!