O'Reilly logo

XAML Developer Reference by Ashish Ghoda, Mamta Dalal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Types of Resources

You can define resources using either XAML or code. The two types of resources are static resources and dynamic resources.

Static Resources

Supported By

WPF

Yes

Silverlight

Yes

A static resource is resolved at compile time, after which the XAML processor assigns it to a property while the XAML loads, which occurs before the application runs. The term StaticResource references a static resource in XAML and includes the key that uniquely identifies the resource. StaticResource is a markup extension, which is a placeholder to resolve a property at runtime. Chapter 4, covers markup extensions in detail.

After a property obtains a value through a StaticResource markup extension, any changes made later to the resource dictionary are ignored. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required