GetIsInDesignMode() public static method

public static GetIsInDesignMode ( Control control ) : bool
control System.Windows.Forms.Control
return bool
Ejemplo n.º 1
0
 public TimePicker()
 {
     if (!ControlUtil.GetIsInDesignMode(this))
     {
         Items.AddRange(Values);
     }
 }
Ejemplo n.º 2
0
        public TextBox()
        {
            _inDesignMode = ControlUtil.GetIsInDesignMode(this);

            LeftButtons          = new EditButtonCollection();
            LeftButtons.Changed += new EventHandler(LeftButtons_Changed);

            RightButtons          = new EditButtonCollection();
            RightButtons.Changed += new EventHandler(RightButtons_Changed);
        }
Ejemplo n.º 3
0
        public ProcessingPanel()
        {
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.Selectable, false);

            _processingSize = Forms.ProcessingSize.Large;
            _updateInterval = 25;
            _inDesignMode   = ControlUtil.GetIsInDesignMode(this);

            UpdateFromSize();
        }
Ejemplo n.º 4
0
        public FlyoutForm()
        {
            _designMode = ControlUtil.GetIsInDesignMode(this);

            FormBorderStyle      = FormBorderStyle.SizableToolWindow;
            ControlBox           = false;
            StartPosition        = FormStartPosition.Manual;
            ShowInTaskbar        = false;
            FadeDuration         = 500;
            Animate              = true;
            DelayHideOnMouseOver = true;
            DismissOnDeactivate  = true;

            _timer       = new Timer();
            _timer.Tick += new EventHandler(_timer_Tick);
        }
Ejemplo n.º 5
0
        private void UpdateThemeData()
        {
            if (!ControlUtil.GetIsInDesignMode(this) && _visualStyles)
            {
#if USE_TAB_RENDERER
                _tabRenderer = new VisualStyleRenderer(VisualStyleElement.Tab.Body.Normal);
#endif
                _borderColor = new VisualStyleRenderer("ListView", 0, 0).GetColor(ColorProperty.BorderColor);

                if (_borderColor == Color.Black)
                {
                    _borderColor = SystemColors.ControlDark;
                }
            }
            else
            {
#if USE_TAB_RENDERER
                _tabRenderer = null;
#endif
                _borderColor = SystemColors.ControlDark;
            }
        }
Ejemplo n.º 6
0
        public void Reload()
        {
            if (ControlUtil.GetIsInDesignMode(this))
            {
                return;
            }
            if (!IsHandleCreated)
            {
                return;
            }

            BeginUpdate();

            Nodes.Clear();

            if (!String.IsNullOrEmpty(_root))
            {
                var node = CreateNode(_root);

                if (node != null)
                {
                    Nodes.Add(node.TreeNode);
                }

                OnNodeCreated(new FileSystemNodeEventArgs(node));

                StartResolver();
            }

            if (Nodes.Count > 0)
            {
                Nodes[0].Expand();
            }

            EndUpdate();
        }