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,以及智慧標記面板。

適用於