Szerkesztés

Megosztás a következőn keresztül:


ArrayExtension Class

Definition

Implements x:Array support for .NET XAML Services.

public ref class ArrayExtension : System::Windows::Markup::MarkupExtension, System::Windows::Markup::IAddChild
public ref class ArrayExtension : System::Windows::Markup::MarkupExtension
[System.Windows.Markup.ContentProperty("Items")]
[System.Windows.Markup.MarkupExtensionReturnType(typeof(System.Array))]
public class ArrayExtension : System.Windows.Markup.MarkupExtension, System.Windows.Markup.IAddChild
[System.Windows.Markup.ContentProperty("Items")]
[System.Windows.Markup.MarkupExtensionReturnType(typeof(System.Array))]
public class ArrayExtension : System.Windows.Markup.MarkupExtension
[<System.Windows.Markup.ContentProperty("Items")>]
[<System.Windows.Markup.MarkupExtensionReturnType(typeof(System.Array))>]
type ArrayExtension = class
    inherit MarkupExtension
    interface IAddChild
[<System.Windows.Markup.ContentProperty("Items")>]
[<System.Windows.Markup.MarkupExtensionReturnType(typeof(System.Array))>]
type ArrayExtension = class
    inherit MarkupExtension
Public Class ArrayExtension
Inherits MarkupExtension
Implements IAddChild
Public Class ArrayExtension
Inherits MarkupExtension
Inheritance
ArrayExtension
Attributes
Implements

Remarks

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.dll. Starting with the .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 the System.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.

Constructors

ArrayExtension()

Initializes a new instance of the ArrayExtension class. This creates an empty array.

ArrayExtension(Array)

Initializes a new instance of the ArrayExtension class based on the provided raw array.

ArrayExtension(Type)

Initializes a new instance of the ArrayExtension class and initializes the type of the array.

Properties

Items

Gets the contents of the array. Settable in XAML through XAML collection syntax.

Type

Gets or sets the type of array to be created when calling ProvideValue(IServiceProvider).

Methods

AddChild(Object)

Appends the supplied object to the end of the array.

AddText(String)

Adds a text node as a new array item.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ProvideValue(IServiceProvider)

Returns an array that is sized to the number of objects supplied in the Items values.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also