语言

TaskUILifetimeHintAttribute 类

定义

定义一个任务生命周期属性,指定用户界面重建的成本。

public ref class TaskUILifetimeHintAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false)]
public sealed class TaskUILifetimeHintAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false)>]
type TaskUILifetimeHintAttribute = class
    inherit Attribute
Public NotInheritable Class TaskUILifetimeHintAttribute
Inherits Attribute
继承
TaskUILifetimeHintAttribute
属性

注解

在集成服务中,这个属性允许你指定重建特定用户界面的成本。 例如,如果用户界面显示一个只有五个字段的下拉列表,这些字段均来自本地计算机,用户界面处理可能相当快且成本较低。 然而,如果用户界面中的下拉列表包含从远程服务器或网络中缓慢收集的信息,用户界面的重建可能既昂贵又耗时。 为了在包设计器关闭前将用户界面保留在内存中,将属性RecreationExpensive设置为 TaskUILifetimeHint 。 要在用户关闭对话框后立即丢弃用户界面,将属性RecreationInexpensive设置为 TaskUILifetimeHint 。

构造函数

名称 说明
TaskUILifetimeHintAttribute(TaskUILifetimeHint)

初始化 TaskUILifetimeHintAttribute 类的新实例。

属性

名称 说明
TaskUILifetimeHint

提供一个估算,作为终身提示,说明重建用户界面的成本。

适用于