MarkupExtensionReturnTypeAttribute 建構函式

定義

初始化 MarkupExtensionReturnTypeAttribute 類別的新執行個體。

多載

MarkupExtensionReturnTypeAttribute()

初始化 MarkupExtensionReturnTypeAttribute 類別的新執行個體。

MarkupExtensionReturnTypeAttribute(Type)

使用所提供的 Type,初始化 MarkupExtensionReturnTypeAttribute 類別的新執行個體。

MarkupExtensionReturnTypeAttribute(Type, Type)
已淘汰.

已取代;請勿使用。

MarkupExtensionReturnTypeAttribute()

初始化 MarkupExtensionReturnTypeAttribute 類別的新執行個體。

public:
 MarkupExtensionReturnTypeAttribute();
public MarkupExtensionReturnTypeAttribute ();
Public Sub New ()

適用於

MarkupExtensionReturnTypeAttribute(Type)

使用所提供的 Type,初始化 MarkupExtensionReturnTypeAttribute 類別的新執行個體。

public:
 MarkupExtensionReturnTypeAttribute(Type ^ returnType);
public MarkupExtensionReturnTypeAttribute (Type returnType);
new System.Windows.Markup.MarkupExtensionReturnTypeAttribute : Type -> System.Windows.Markup.MarkupExtensionReturnTypeAttribute
Public Sub New (returnType As Type)

參數

returnType
Type

這個屬性所報告的傳回型別。

備註

MarkupExtension衍生的自定義類別應該套用這個屬性,以指出實ProvideValue作所傳回的類型安全傳回型別。

適用於

MarkupExtensionReturnTypeAttribute(Type, Type)

警告

The expressionType argument is not used by the XAML parser. To specify the expected return type, use MarkupExtensionReturnTypeAttribute(Type). To specify custom handling for expression types, use XamlSetMarkupExtensionAttribute.

已取代;請勿使用。

public:
 MarkupExtensionReturnTypeAttribute(Type ^ returnType, Type ^ expressionType);
public MarkupExtensionReturnTypeAttribute (Type returnType, Type expressionType);
[System.Obsolete("The expressionType argument is not used by the XAML parser. To specify the expected return type, use MarkupExtensionReturnTypeAttribute(Type). To specify custom handling for expression types, use XamlSetMarkupExtensionAttribute.")]
public MarkupExtensionReturnTypeAttribute (Type returnType, Type expressionType);
new System.Windows.Markup.MarkupExtensionReturnTypeAttribute : Type * Type -> System.Windows.Markup.MarkupExtensionReturnTypeAttribute
[<System.Obsolete("The expressionType argument is not used by the XAML parser. To specify the expected return type, use MarkupExtensionReturnTypeAttribute(Type). To specify custom handling for expression types, use XamlSetMarkupExtensionAttribute.")>]
new System.Windows.Markup.MarkupExtensionReturnTypeAttribute : Type * Type -> System.Windows.Markup.MarkupExtensionReturnTypeAttribute
Public Sub New (returnType As Type, expressionType As Type)

參數

returnType
Type

這個 .NET Framework 屬性報告的傳回型別。

expressionType
Type

已取代;請勿使用。

屬性

備註

報告表達式第二個參數的格式 MarkupExtensionReturnTypeAttribute 已被取代/過時,不應使用。 如果表示式或其他延遲評估型別或模型是可能的傳回型別,您應該使用 的 Object 傳回型別屬性,而不是 。

適用於