コード例 #1
0
        public static ExchangePropertyPageControl WrapUserControlAsPage(BindableUserControl control)
        {
            ExchangePropertyPageControl exchangePropertyPageControl = new ExchangePropertyPageControl();

            exchangePropertyPageControl.SuspendLayout();
            control.Dock = DockStyle.Fill;
            exchangePropertyPageControl.Padding = new Padding(13, 12, 0, 12);
            exchangePropertyPageControl.Controls.Add(control);
            exchangePropertyPageControl.Text                = control.Text;
            exchangePropertyPageControl.AutoSize            = true;
            exchangePropertyPageControl.AutoSizeMode        = AutoSizeMode.GrowAndShrink;
            exchangePropertyPageControl.AutoScaleDimensions = ExchangeUserControl.DefaultAutoScaleDimension;
            exchangePropertyPageControl.AutoScaleMode       = AutoScaleMode.Font;
            exchangePropertyPageControl.ResumeLayout(false);
            exchangePropertyPageControl.PerformLayout();
            exchangePropertyPageControl.HelpTopic = control.GetType().FullName;
            return(exchangePropertyPageControl);
        }