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 为 的属性。

适用于