本文整理匯總了C#中System.Windows.Forms.PropertyGrid.ResumeLayout方法的典型用法代碼示例。如果您正苦於以下問題:C# PropertyGrid.ResumeLayout方法的具體用法?C# PropertyGrid.ResumeLayout怎麽用?C# PropertyGrid.ResumeLayout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.PropertyGrid
的用法示例。
在下文中一共展示了PropertyGrid.ResumeLayout方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: InitializeComponents
private void InitializeComponents()
{
const int FORM_WIDTH = 400;
const int FORM_HEIGHT = 400;
propertyGrid = new PropertyGrid();
okButton = new Button();
cancelButton = new Button();
propertyGrid.SuspendLayout();
okButton.SuspendLayout();
cancelButton.SuspendLayout();
propertyGrid.Location = new Point(5, 5);
propertyGrid.Size = new Size(FORM_WIDTH-20, FORM_HEIGHT-80);
propertyGrid.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;
propertyGrid.ToolbarVisible = false;
okButton.Location = new Point(FORM_WIDTH-75*2-40, FORM_HEIGHT-60);
okButton.Size = new Size(75, 23);
okButton.Text = "OK";
okButton.FlatStyle = FlatStyle.Flat;
okButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
okButton.Click += delegate {
this.DialogResult = DialogResult.OK;
this.Close();
};
cancelButton.Location = new Point(FORM_WIDTH-75-20, FORM_HEIGHT-60);
cancelButton.Size = new Size(75, 23);
cancelButton.Text = "Cancel";
cancelButton.FlatStyle = FlatStyle.Flat;
cancelButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
cancelButton.Click += delegate {
this.DialogResult = DialogResult.Cancel;
this.Close();
};
this.Size = new Size(FORM_WIDTH, FORM_HEIGHT);
this.FormBorderStyle = FormBorderStyle.SizableToolWindow;
this.Text = "Settings";
this.Controls.AddRange(new Control[]{
propertyGrid,
okButton,
cancelButton
});
propertyGrid.ResumeLayout(false);
okButton.ResumeLayout(false);
cancelButton.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}