ManagementGroupBox Classe
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Representa um quadro em torno de um grupo de controles relacionados.
public ref class ManagementGroupBox : System::Windows::Forms::GroupBox
public class ManagementGroupBox : System.Windows.Forms.GroupBox
type ManagementGroupBox = class
inherit GroupBox
Public Class ManagementGroupBox
Inherits GroupBox
- Herança
-
ManagementGroupBox
Exemplos
O exemplo a seguir implementa os métodos e as propriedades da ManagementGroupBox classe . O exemplo cria uma caixa de grupo que contém controles que permitem alterar a RightToLeftLayout propriedade, criar uma propriedade personalizada CreateParams e criar um método personalizado OnRightToLeftChanged . A página do assistente é colocada em um WizardForm objeto .
using System;
using System.Windows.Forms;
using Microsoft.Web.Management.Client.Win32;
namespace ExtensibilityDemo
{
public partial class PageManagementGroupBox : WizardPage
{
public PageManagementGroupBox()
{
InitializeComponent();
// Set the initial label1 text to the RightToLeftLayout value.
label1.Text = this.ManagementGroupBox1.RightToLeftLayout.ToString();
Caption = "ManagementGroupBox";
}
// Enable the next button.page.
protected override bool CanNavigateNext
{
get
{
return true;
}
}
// Create the customized OnRightToLeftchanged method.
protected override void OnRightToLeftChanged(EventArgs e)
{
ShowMessage("Management group box 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.ManagementGroupBox1.RightToLeftLayout = !this.ManagementGroupBox1.RightToLeftLayout;
OnRightToLeftChanged(e);
label1.Text = this.ManagementGroupBox1.RightToLeftLayout.ToString();
}
// The CreateParams button is clicked.
private void button2_Click(object sender, EventArgs e)
{
label2.Text = this.CreateParams.ToString();
}
}
}
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.ManagementGroupBox1 = new Microsoft.Web.Management.Client.Win32.ManagementGroupBox();
this.label2 = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
this.ManagementGroupBox1.SuspendLayout();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(19, 38);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(164, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Change right to left layout";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(203, 43);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 13);
this.label1.TabIndex = 1;
this.label1.Text = "label1";
//
// ManagementGroupBox1
//
this.ManagementGroupBox1.Controls.Add(this.label2);
this.ManagementGroupBox1.Controls.Add(this.button2);
this.ManagementGroupBox1.Controls.Add(this.button1);
this.ManagementGroupBox1.Controls.Add(this.label1);
this.ManagementGroupBox1.Location = new System.Drawing.Point(15, 22);
this.ManagementGroupBox1.Name = "ManagementGroupBox1";
this.ManagementGroupBox1.RightToLeftLayout = false;
this.ManagementGroupBox1.Size = new System.Drawing.Size(528, 150);
this.ManagementGroupBox1.TabIndex = 2;
this.ManagementGroupBox1.TabStop = false;
this.ManagementGroupBox1.Text = "ManagementGroupBox1";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(203, 94);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(35, 13);
this.label2.TabIndex = 3;
this.label2.Text = "label2";
//
// button2
//
this.button2.Location = new System.Drawing.Point(19, 89);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(164, 23);
this.button2.TabIndex = 4;
this.button2.Text = "Create Params";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// PageManagementGroupBox
//
this.Controls.Add(this.ManagementGroupBox1);
this.Name = "PageManagementGroupBox";
this.Size = new System.Drawing.Size(560, 200);
this.ManagementGroupBox1.ResumeLayout(false);
this.ManagementGroupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private Microsoft.Web.Management.Client.Win32.ManagementGroupBox ManagementGroupBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button2;
Comentários
Um ManagementGroupBox objeto exibe um quadro em torno de uma coleção de controles relacionados em um WizardPage objeto . Esse controle é semelhante a um System.Windows.Forms.GroupBox objeto .
Construtores
ManagementGroupBox() |
Inicializa uma nova instância da classe ManagementGroupBox. |
Propriedades
CreateParams |
Obtém os parâmetros de criação necessários quando a caixa do grupo de gerenciamento é criada. |
RightToLeftLayout |
Obtém ou define um valor que indica se o posicionamento do espelho da direita para a esquerda está habilitado. |
Métodos
OnRightToLeftChanged(EventArgs) |
Fornece um mecanismo para executar uma ação quando a RightToLeftLayout propriedade é alterada. |