public void AddStandardItems()
        {
            BindingNavigator navigator = new BindingNavigator();

            navigator.AddStandardItems();
            CheckStandardItems(navigator);
        }
Beispiel #2
0
        private void Init()
        {
            // Set up the BindingSource component.
            _customersBindingNavigator.AddStandardItems();
            _customersBindingNavigator.BindingSource = _customersBindingSource;
            _customersBindingNavigator.Dock          = DockStyle.Top;
            this.Controls.Add(_customersBindingNavigator);

            // Set up the TextBox control for displaying company names.
            _companyNameTextBox.Dock = DockStyle.Bottom;
            this.Controls.Add(_companyNameTextBox);
        }
        public override void InitializeNewComponent(IDictionary defaultValues)
        {
            base.InitializeNewComponent(defaultValues);
            BindingNavigator component = (BindingNavigator)base.Component;
            IDesignerHost    service   = (IDesignerHost)base.Component.Site.GetService(typeof(IDesignerHost));

            try
            {
                ToolStripDesigner._autoAddNewItems = false;
                component.SuspendLayout();
                component.AddStandardItems();
                this.SiteItems(service, component.Items);
                this.RaiseItemsChanged();
                component.ResumeLayout();
                component.ShowItemToolTips = true;
            }
            finally
            {
                ToolStripDesigner._autoAddNewItems = true;
            }
        }