DesignerActionUIService.Refresh(IComponent) 方法

定义

更新智能标记面板。

public:
 void Refresh(System::ComponentModel::IComponent ^ component);
public void Refresh (System.ComponentModel.IComponent component);
member this.Refresh : System.ComponentModel.IComponent -> unit
Public Sub Refresh (component As IComponent)

参数

component
IComponent

要刷新的 IComponent

示例

下面的代码示例演示如何使用 Refresh 方法更新智能标记面板。 此示例是类概述中提供的更大示例的一 DesignerActionService 部分。

// Boolean properties are automatically displayed with binary 
// UI (such as a checkbox).
public bool LockColors
{
    get
    {
        return colLabel.ColorLocked;
    }
    set
    {
        GetPropertyByName("ColorLocked").SetValue(colLabel, value);

        // Refresh the list.
        this.designerActionUISvc.Refresh(this.Component);
    }
}
'Boolean properties are automatically displayed with binary 
' UI (such as a checkbox).
Public Property LockColors() As Boolean
    Get
        Return colLabel.ColorLocked
    End Get
    Set(ByVal value As Boolean)
        GetPropertyByName("ColorLocked").SetValue(colLabel, value)

        ' Refresh the list.
        Me.designerActionUISvc.Refresh(Me.Component)
    End Set
End Property

注解

方法 Refresh 更新内部 DesignerActionGlyph以及智能标记面板。

适用于