Export (0) Print
Expand All

ArrayExtension Class

Implements x:Array support for .NET Framework XAML Services

Namespace:  System.Windows.Markup
Assembly:  System.Xaml (in System.Xaml.dll)
XMLNS for XAML: Not mapped to an xmlns.

[MarkupExtensionReturnTypeAttribute(typeof(Array))]
[ContentPropertyAttribute("Items")]
public class ArrayExtension : MarkupExtension

The ArrayExtension type exposes the following members.

  NameDescription
Public methodArrayExtension()Initializes a new instance of the ArrayExtension class. This creates an empty array.
Public methodArrayExtension(Array)Initializes a new instance of the ArrayExtension class based on the provided raw array.
Public methodArrayExtension(Type)Initializes a new instance of the ArrayExtension class and initializes the type of the array.
Top

  NameDescription
Public propertyItemsGets the contents of the array. Settable in XAML through XAML collection syntax.
Public propertyTypeGets or sets the type of array to be created when calling ProvideValue.
Top

  NameDescription
Public methodAddChildAppends the supplied object to the end of the array.
Public methodAddTextAdds a text node as a new array item.
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 array that is sized to the number of objects supplied in the Items values. (Overrides MarkupExtension.ProvideValue(IServiceProvider).)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

ArrayExtension is the class that implements the x:Array markup extension behavior, and the x:ArrayExtension information item from [MS-XAML]. x:Array supports a XAML language feature that allows adding arbitrary child elements within an array, through a particular markup extension enabled syntax. The markup extension syntax requires an explicit Type attribute on the markup extension usage, and a content syntax for specifying the Items. For more information and details on the syntax, see x:Array Markup Extension.

This class is a markup extension implementation. Markup extension classes exist mainly to provide infrastructure support for some aspect of a XAML processor implementation, and the members exposed by a markup extension class are not typically called from user code. This extension supports the x:Array Markup Extension usage from XAML for .NET Framework XAML Services implementation of XAML and its XAML readers and XAML writers.

In previous versions of the .NET Framework, this class existed in the WPF-specific assembly PresentationFramework. In .NET Framework 4, ArrayExtension is in the System.Xaml assembly. This makes the x:Array usage available to frameworks or technologies such as Windows Workflow Foundation that are built on .NET Framework XAML Services. For more information, see Types Migrated from WPF to System.Xaml.

The System.Xaml assembly uses XmlnsDefinitionAttribute to map types from theSystem.Windows.Markup CLR namespace in the assembly to the XAML namespace for the XAML language (http://schemas.microsoft.com/winfx/2006/xaml). In typical XAML markup, 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, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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.
Show:
© 2014 Microsoft