ArrayExtension 類別

定義

實作 .NET XAML 服務的 x:Array 支援。

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
繼承
ArrayExtension
屬性
實作

備註

ArrayExtension 是實作 x:Array 標記延伸行為的類別,以及 x:ArrayExtension 來自 [MS-XAML] 的信息專案。 x:Array 支援 XAML 語言功能,允許透過啟用特定標記延伸的語法,在陣列中新增任意子專案。 標記延伸語法需要標記延伸使用方式的明確 Type 屬性,以及指定 Items的內容語法。 如需語法的詳細資訊和詳細數據,請參閱 x:Array 標記延伸

這個類別是標記延伸實作。 標記延伸類別主要是為了提供 XAML 處理器實作某些層面的基礎結構支援,而且標記延伸類別所公開的成員通常不會從使用者程式代碼呼叫。 此延伸模組支援 XAML 的 x:Array 標記延伸使用方式,以便 .NET Framework XAML 服務實作及其 XAML 讀取器和 XAML 寫入器。

在舊版的 .NET Framework 中,這個類別存在於 WPF 特定元件 PresentationFramework.dll 中。 從 .NET Framework 4 開始,ArrayExtension位於 System.Xaml 元件中。 這可讓x:Array架構或技術使用,例如建置在 .NET Framework XAML 服務上的 Windows Workflow Foundation。 如需詳細資訊,請參閱 Types Migrated from WPF to System.Xaml

System.Xaml 元件會使用 XmlnsDefinitionAttribute ,將元件中的 CLR 命名空間中的類型 System.Windows.Markup 對應至 XAML 語言的 XAML 命名空間 (http://schemas.microsoft.com/winfx/2006/xaml) 。 在一般 XAML 標記中,您會在根元素對應中宣告 的 http://schemas.microsoft.com/winfx/2006/xaml 前置詞,並使用前置詞 x

建構函式

ArrayExtension()

初始化 ArrayExtension 類別的新執行個體。 這會建立空陣列。

ArrayExtension(Array)

根據提供的原始陣列初始化 ArrayExtension 類別的新執行個體。

ArrayExtension(Type)

初始化 ArrayExtension 類別的新執行個體,並初始化陣列的類型。

屬性

Items

取得陣列的內容。 可在 XAML 中透過 XAML 集合語法設定。

Type

取得或設定呼叫 ProvideValue(IServiceProvider) 時所要建立的陣列類型。

方法

AddChild(Object)

將提供的物件附加至陣列的結尾。

AddText(String)

加入文字節點作為新的陣列項目。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ProvideValue(IServiceProvider)

傳回陣列,這個陣列的大小調整為 Items 值中所提供的物件數。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱