Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

Reference Class

Implements the {x:Reference} markup extension.

Namespace:  System.Windows.Markup
Assembly:  System.Xaml (in System.Xaml.dll)
XMLNS for XAML: Not mapped to an xmlns.
[ContentPropertyAttribute("Name")]
public class Reference : MarkupExtension

The Reference type exposes the following members.

  NameDescription
Public methodReference()Initializes a new instance of the Reference class.
Public methodReference(String)Initializes a new instance of the Reference class with the name argument.
Top
  NameDescription
Public propertyNameGets or sets the XAML name to obtain the reference for.
Top
  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodProvideValueReturns an object that is the value of the target property. For the Reference type, this is the object that the provided Name references. (Overrides MarkupExtension.ProvideValue(IServiceProvider).)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The {x:Reference} markup extension supports a positional usage (there is only one parameter) and a named argument usage (with the named argument name).

The {x:Reference} markup extension is used to reference another named object in the object graph. Objects in this scenario are initially named by x:Name, although specific implementations often define a different RuntimeNamePropertyAttribute. For more information, see x:Reference Markup Extension.

For more information about markup extensions, see Type Converters and Markup Extensions for XAML.

The System.Xaml assembly uses XmlnsDefinitionAttribute to map all types in the assembly to the XAML namespace for the XAML language (http://schemas.microsoft.com/winfx/2006/xaml). Typically you declare a prefix for http://schemas.microsoft.com/winfx/2006/xaml in a root element mapping and use the prefix x.

.NET Framework

Supported in: 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.