ManagementPanel Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a control that groups a collection of controls.
public ref class ManagementPanel : System::Windows::Forms::Panel
public class ManagementPanel : System.Windows.Forms.Panel
type ManagementPanel = class
inherit Panel
Public Class ManagementPanel
Inherits Panel
- Inheritance
-
ManagementPanel
Examples
The following example implements the methods and properties of the ManagementPanel class. The example creates a management panel 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 PageManagementPanel : WizardPage
{
public PageManagementPanel()
{
InitializeComponent();
// Set the initial label1 text to the RightToLeftLayout value.
label1.Text = this.ManagementPanel1.RightToLeftLayout.ToString();
Caption = "ManagementPanel";
}
// Enable the next button.
protected override bool CanNavigateNext
{
get
{
return true;
}
}
// Enable the previous button.
protected override bool CanNavigatePrevious
{
get
{
return true;
}
}
// Create the customized OnRightToLeftChanged method.
protected override void OnRightToLeftChanged(EventArgs e)
{
ShowMessage("Management panel 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.ManagementPanel1.RightToLeftLayout = !this.ManagementPanel1.RightToLeftLayout;
OnRightToLeftChanged(e);
label1.Text = this.ManagementPanel1.RightToLeftLayout.ToString();
}
// The CreateParams button is clicked.
private void button2_Click(object sender, EventArgs e)
{
label2.Text = this.CreateParams.ToString();
}
}
}
private void InitializeComponent()
{
this.ManagementPanel1 = new Microsoft.Web.Management.Client.Win32.ManagementPanel();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.ManagementPanel1.SuspendLayout();
this.SuspendLayout();
//
// ManagementPanel1
//
this.ManagementPanel1.BackColor = System.Drawing.SystemColors.ControlDark;
this.ManagementPanel1.Controls.Add(this.label2);
this.ManagementPanel1.Controls.Add(this.label1);
this.ManagementPanel1.Controls.Add(this.button2);
this.ManagementPanel1.Controls.Add(this.button1);
this.ManagementPanel1.Location = new System.Drawing.Point(20, 19);
this.ManagementPanel1.Name = "ManagementPanel1";
this.ManagementPanel1.RightToLeftLayout = true;
this.ManagementPanel1.Size = new System.Drawing.Size(519, 162);
this.ManagementPanel1.TabIndex = 0;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(192, 120);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(35, 13);
this.label2.TabIndex = 3;
this.label2.Text = "label2";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(297, 28);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 13);
this.label1.TabIndex = 2;
this.label1.Text = "label1";
//
// button2
//
this.button2.BackColor = System.Drawing.SystemColors.Control;
this.button2.Location = new System.Drawing.Point(360, 89);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(145, 23);
this.button2.TabIndex = 1;
this.button2.Text = "Create Params";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
this.button1.BackColor = System.Drawing.SystemColors.Control;
this.button1.Location = new System.Drawing.Point(360, 23);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(145, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Change right to left layout";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// PageManagementPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.ManagementPanel1);
this.Name = "PageManagementPanel";
this.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.Size = new System.Drawing.Size(560, 200);
this.ManagementPanel1.ResumeLayout(false);
this.ManagementPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private Microsoft.Web.Management.Client.Win32.ManagementPanel ManagementPanel1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
Remarks
A ManagementPanel object groups a collection of controls in a WizardPage object. This control resembles a System.Windows.Forms.Panel object.
Constructors
ManagementPanel() |
Initializes a new instance of the ManagementPanel 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. |