共用方式為


DesignerActionUIService.Refresh(IComponent) 方法

定義

更新智慧標記面板。

public:
 void Refresh(System::ComponentModel::IComponent ^ component);
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,以及智慧標記面板。

適用於