Share via


WizardPage.OnRightToLeftChanged(EventArgs) Method

Definition

Provides a mechanism to perform an action when the RightToLeftLayout property changes.

protected:
 override void OnRightToLeftChanged(EventArgs ^ e);
protected override void OnRightToLeftChanged (EventArgs e);
override this.OnRightToLeftChanged : EventArgs -> unit
Protected Overrides Sub OnRightToLeftChanged (e As EventArgs)

Parameters

e
EventArgs

A EventArgs that contains the event data.

Examples

The following example demonstrates the OnRightToLeftChanged method. When the RightToLeftLayout property is changed, this method is called and modifies the text of the button. This code example is part of a larger example provided for the WizardPage class.

// Customize the RightToLeftLayout property.
public new bool RightToLeftLayout
{
    get
    {
        return _rightToLeftLayout;
    }
    set
    {
        _rightToLeftLayout = value;
    }
}
// The Right to Left button is clicked.
private void button4_Click(object sender, EventArgs e)
{
    if(RightToLeftLayout)
    {
        RightToLeft = RightToLeft.No;
    }
    else
    {
        RightToLeft = RightToLeft.Yes;
    }
    RightToLeftLayout = !RightToLeftLayout;
}
// The RightToLeft method was called.
protected override void  OnRightToLeftChanged(EventArgs e)
{
    this.button4.Text = "Change R to L Layout : currently " + RightToLeft.ToString();
    base.OnRightToLeftChanged(e);
}

Remarks

Implementers should call this method when the RightToLeftLayout property changes. This method enables you to create a custom OnRightToLeftChanged method.

Applies to