Bagikan melalui


DesignerActionUIService.Refresh(IComponent) Metode

Definisi

Memperbarui panel tag pintar.

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)

Parameter

component
IComponent

IComponent untuk di-refresh.

Contoh

Contoh kode berikut menunjukkan cara menggunakan metode Refresh untuk memperbarui panel tag pintar. Contoh ini adalah bagian dari contoh yang lebih besar yang tersedia dalam ringkasan kelas 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

Keterangan

Metode Refresh memperbarui DesignerActionGlyphinternal , serta panel tag pintar.

Berlaku untuk