Share via


ManagementTabPage Class

Definition

Represents a single tab page in a set of tab pages.

public ref class ManagementTabPage : System::Windows::Forms::TabPage
public class ManagementTabPage : System.Windows.Forms.TabPage
type ManagementTabPage = class
    inherit TabPage
Public Class ManagementTabPage
Inherits TabPage
Inheritance
ManagementTabPage

Examples

The following example implements the methods and properties of the ManagementTabPage class. The example creates a tab page that contains controls that enable you to change the RightToLeftLayout property, create a custom CreateParams property, and create a custom OnRightToLeftChanged method. The wizard page is put into a WizardForm object.

using System;
using System.Windows.Forms;
using Microsoft.Web.Management.Client.Win32;

namespace ExtensibilityDemo
{
    public partial class PageManagementTabPage : WizardPage
    {
        public PageManagementTabPage()
        {
            InitializeComponent();
            // Set the initial label1 text to the RightToLeftLayout value.
            label1.Text = this.ManagementTabPage1.RightToLeftLayout.ToString();
            Caption = "ManagementTabPage";
        } 
        // This is the modificationpage page. You can navigate to the previous page.
        protected override bool CanNavigatePrevious
        {
            get
            {
                return true;
            }
        }
        // Create the customized OnRightToLeftChanged method.
        protected override void OnRightToLeftChanged(EventArgs e)
        {
            ShowMessage("Management tab page RightToLeftLayout changed");
        }
        // Create the customized CreateParams property.
        protected override CreateParams CreateParams
        {
            get
            {
                const int WS_EX_LAYOUTRTL = 0x400000;
                const int WS_EX_NOINHERITLAHYOUT = 0x100000;

                CreateParams CP;
                CP = base.CreateParams;
                CP.ExStyle = CP.ExStyle | WS_EX_LAYOUTRTL | WS_EX_NOINHERITLAHYOUT;
                return CP;
            }
        }
        // The Change RightToLeftLayout button is clicked.
        private void button1_Click(object sender, EventArgs e)
        {
            this.ManagementTabPage1.RightToLeftLayout = !this.ManagementTabPage1.RightToLeftLayout;
            OnRightToLeftChanged(e);
            label1.Text = this.ManagementTabPage1.RightToLeftLayout.ToString();
        }
        // The CreateParams button is clicked.
        private void button2_Click(object sender, EventArgs e)
        {
            label2.Text = this.CreateParams.ToString();
        }
    }
}
private void InitializeComponent()
{
    this.tabControl1 = new System.Windows.Forms.TabControl();
    this.ManagementTabPage1 = new Microsoft.Web.Management.Client.Win32.ManagementTabPage();
    this.label1 = new System.Windows.Forms.Label();
    this.button1 = new System.Windows.Forms.Button();
    this.ManagementTabPage2 = new Microsoft.Web.Management.Client.Win32.ManagementTabPage();
    this.label2 = new System.Windows.Forms.Label();
    this.button2 = new System.Windows.Forms.Button();
    this.tabControl1.SuspendLayout();
    this.ManagementTabPage1.SuspendLayout();
    this.ManagementTabPage2.SuspendLayout();
    this.SuspendLayout();
    // 
    // tabControl1
    // 
    this.tabControl1.Controls.Add(this.ManagementTabPage1);
    this.tabControl1.Controls.Add(this.ManagementTabPage2);
    this.tabControl1.Location = new System.Drawing.Point(15, 21);
    this.tabControl1.Name = "tabControl1";
    this.tabControl1.SelectedIndex = 0;
    this.tabControl1.Size = new System.Drawing.Size(526, 164);
    this.tabControl1.TabIndex = 0;
    // 
    // ManagementTabPage1
    // 
    this.ManagementTabPage1.Controls.Add(this.label1);
    this.ManagementTabPage1.Controls.Add(this.button1);
    this.ManagementTabPage1.Location = new System.Drawing.Point(4, 22);
    this.ManagementTabPage1.Name = "ManagementTabPage1";
    this.ManagementTabPage1.RightToLeftLayout = false;
    this.ManagementTabPage1.Size = new System.Drawing.Size(518, 138);
    this.ManagementTabPage1.TabIndex = 1;
    this.ManagementTabPage1.Text = "ManagementTabPage1";
    this.ManagementTabPage1.UseVisualStyleBackColor = true;
    // 
    // label1
    // 
    this.label1.AutoSize = true;
    this.label1.Location = new System.Drawing.Point(121, 57);
    this.label1.Name = "label1";
    this.label1.Size = new System.Drawing.Size(35, 13);
    this.label1.TabIndex = 2;
    this.label1.Text = "label1";
    // 
    // button1
    // 
    this.button1.Location = new System.Drawing.Point(21, 25);
    this.button1.Name = "button1";
    this.button1.Size = new System.Drawing.Size(164, 23);
    this.button1.TabIndex = 3;
    this.button1.Text = "Change right to left layout";
    this.button1.UseVisualStyleBackColor = true;
    this.button1.Click += new System.EventHandler(this.button1_Click);
    // 
    // ManagementTabPage2
    // 
    this.ManagementTabPage2.Controls.Add(this.label2);
    this.ManagementTabPage2.Controls.Add(this.button2);
    this.ManagementTabPage2.Location = new System.Drawing.Point(4, 22);
    this.ManagementTabPage2.Name = "ManagementTabPage2";
    this.ManagementTabPage2.RightToLeftLayout = false;
    this.ManagementTabPage2.Size = new System.Drawing.Size(518, 138);
    this.ManagementTabPage2.TabIndex = 4;
    this.ManagementTabPage2.Text = "ManagementTabPage2";
    this.ManagementTabPage2.UseVisualStyleBackColor = true;
    // 
    // label2
    // 
    this.label2.AutoSize = true;
    this.label2.Location = new System.Drawing.Point(143, 70);
    this.label2.Name = "label2";
    this.label2.Size = new System.Drawing.Size(35, 13);
    this.label2.TabIndex = 5;
    this.label2.Text = "label2";
    // 
    // button2
    // 
    this.button2.Location = new System.Drawing.Point(62, 23);
    this.button2.Name = "button2";
    this.button2.Size = new System.Drawing.Size(164, 23);
    this.button2.TabIndex = 6;
    this.button2.Text = "Create Params";
    this.button2.UseVisualStyleBackColor = true;
    this.button2.Click += new System.EventHandler(this.button2_Click);
    // 
    // PageManagementTabPage
    // 
    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    this.Controls.Add(this.tabControl1);
    this.Name = "PageManagementTabPage";
    this.Size = new System.Drawing.Size(560, 200);
    this.tabControl1.ResumeLayout(false);
    this.ManagementTabPage1.ResumeLayout(false);
    this.ManagementTabPage1.PerformLayout();
    this.ManagementTabPage2.ResumeLayout(false);
    this.ManagementTabPage2.PerformLayout();
    this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.TabControl tabControl1;
private Microsoft.Web.Management.Client.Win32.ManagementTabPage ManagementTabPage1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
private Microsoft.Web.Management.Client.Win32.ManagementTabPage ManagementTabPage2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button2;

Remarks

A ManagementTabPage object groups a collection of controls for a System.Windows.Forms.TabControl object in a WizardPage object. This control resembles a System.Windows.Forms.TabPage object.

Constructors

ManagementTabPage()

Initializes a new instance of the ManagementTabPage class.

Properties

CreateParams

Gets the required creation parameters when the management panel is created.

RightToLeftLayout

Gets or sets a value indicating whether right-to-left mirror placement is enabled.

Methods

OnRightToLeftChanged(EventArgs)

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

Applies to

See also