System.Windows.Forms.Control.UpdateStyles Method

Forces the assigned styles to be reapplied to the control.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
protected void UpdateStyles ()

Remarks

This method calls the Control.CreateParams method to get the styles to apply. The styles assigned to the CreateParams.Style and CreateParams.ExStyle properties of the System.Windows.Forms.CreateParams assigned to the control's Control.CreateParams property are reapplied. The control is repainted to reflect the style changes if necessary.

The Control.UpdateStyles method has no effect if the Control.IsHandleCreated property value is false.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0