Alsing.Windows.Forms.SyntaxBox.SyntaxBoxDesigner.InitializeNewComponent C# (CSharp) Method

InitializeNewComponent() public method

public InitializeNewComponent ( System defaultValues ) : void
defaultValues System
return void
        public override void InitializeNewComponent(System.Collections.IDictionary defaultValues)
        {
            base.InitializeNewComponent(defaultValues);
            if (DesignerHost != null)
            {
                DesignerTransaction trans = DesignerHost.CreateTransaction(
                    "Adding Syntaxdocument");
                var sd = DesignerHost.CreateComponent
                             (typeof(SyntaxDocument)) as
                         SyntaxDocument;
                
                var sb = Control as SyntaxBoxControl;

                if (sb == null)
                {
                    trans.Cancel();
                }
                else
                {
                    sb.Document = sd;
                    trans.Commit();
                }
            }
        }
    }
SyntaxBoxDesigner