Application.Resources property

Expand
This topic has not yet been rated - Rate this topic

Application.Resources property

[This documentation is preliminary and is subject to change.]

Gets a collection of application-scoped resources, such as styles, templates, and brushes.

Syntax


public ResourceDictionary Resources { get; set; }


<Application>
  <Application.Resources>
    oneOrMoreResourceElements
  </Application.Resources>
</Application>
 

XAML Values

oneOrMoreResourceElements

One or more object elements, each of which creates and defines a resource. Each resource property element within each ResourceDictionary must have a unique value for the x:Key, which serves as the unique key when values are retrieved from the ResourceDictionary.

Property value

Type: ResourceDictionary

A ResourceDictionary object that contains zero or more application-scoped resources.

Remarks

The resource dictionary model supports many of the resource concepts you may be familiar with if you have created applications using Windows Presentation Foundation (WPF) or Microsoft Silverlight. The keys used for resource dictionary entries are object typed, which means that you can potentially key resource entries using keys of non-string type, if you have a markup extension available such that the x:Key value can be specified in attribute-value form XAML. For more info, see ResourceDictionary and StaticResource references.

Requirements

Minimum supported client

Windows 8 Release Preview

Minimum supported server

Windows Server 2012

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

Application
x:Key
ResourceDictionary and StaticResource references
StaticResource
Application resources and localization sample

 

 

Build date: 5/22/2012

Did you find this helpful?
(1500 characters remaining)
Community Additions ADD