System.Windows.Forms.Control.Invalidate()

Here are the examples of the csharp api class System.Windows.Forms.Control.Invalidate() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

200 Examples 7

1. Example

Project: TraceLab
Source File: ExtendedForm.cs
private void EnableGlass()
        {
            if( !DesignMode && Glass.IsDwmCompositionEnabled )
            {
                Glass.ExtendFrameIntoClientArea(this, GlassMargin);
                Invalidate();
            }
        }

2. Example

Project: Krypton
Source File: DropDockingIndicatorsSquare.cs
public void MouseReset()
		{
			// Do we need to update display?
			if (_dragData.AnyActive)
			{
                _dragData.ClearActive();
				Invalidate();
			}
        }

3. Example

Project: Krypton
Source File: KryptonCheckedListBox.cs
protected override void OnMouseEnter(EventArgs e)
        {
            _mouseOver = true;
            PerformNeedPaint(true);
            _listBox.Invalidate();
            base.OnMouseEnter(e);
        }

4. Example

Project: Krypton
Source File: KryptonCheckedListBox.cs
protected override void OnMouseLeave(EventArgs e)
        {
            _mouseOver = false;
            PerformNeedPaint(true);
            _listBox.Invalidate();
            base.OnMouseLeave(e);
        }

5. Example

Project: Krypton
Source File: KryptonComboBox.cs
protected override void OnMouseEnter(EventArgs e)
        {
            _mouseOver = true;
            PerformNeedPaint(false);
            _comboBox.Invalidate();
            base.OnMouseEnter(e);
        }

6. Example

Project: Krypton
Source File: KryptonComboBox.cs
protected override void OnMouseLeave(EventArgs e)
        {
            _mouseOver = false;
            PerformNeedPaint(false);
            _comboBox.Invalidate();
            base.OnMouseLeave(e);
        }

7. Example

Project: Krypton
Source File: KryptonComboBox.cs
protected override void OnPaletteChanged(EventArgs e)
        {
            base.OnPaletteChanged(e);
            _comboBox.Invalidate();
        }

8. Example

Project: Krypton
Source File: KryptonComboBox.cs
protected override void OnPaletteNeedPaint(object sender, NeedLayoutEventArgs e)
        {
            base.OnPaletteChanged(e);
            _comboBox.Invalidate();
        }

9. Example

Project: Krypton
Source File: KryptonComboBox.cs
private void OnComboBoxGotFocus(object sender, EventArgs e)
        {
            base.OnGotFocus(e);
            PerformNeedPaint(false);
            _comboBox.Invalidate();
        }

10. Example

Project: Krypton
Source File: KryptonComboBox.cs
private void OnComboBoxLostFocus(object sender, EventArgs e)
        {
            base.OnLostFocus(e);
            PerformNeedPaint(false);
            _comboBox.Invalidate();
        }

11. Example

Project: Krypton
Source File: KryptonDomainUpDown.cs
private void InvalidateChildren()
        {
            if (DomainUpDown != null)
            {
                DomainUpDown.Invalidate();
                PI.RedrawWindow(Handle, IntPtr.Zero, IntPtr.Zero, 0x85);
            }
        }

12. Example

Project: Krypton
Source File: KryptonListBox.cs
protected override void OnMouseEnter(EventArgs e)
        {
            _mouseOver = true;
            PerformNeedPaint(true);
            _listBox.Invalidate();
            base.OnMouseEnter(e);
        }

13. Example

Project: Krypton
Source File: KryptonListBox.cs
protected override void OnMouseLeave(EventArgs e)
        {
            _mouseOver = false;
            PerformNeedPaint(true);
            _listBox.Invalidate();
            base.OnMouseLeave(e);
        }

14. Example

Project: Krypton
Source File: KryptonMaskedTextBox.cs
protected override void OnMouseEnter(EventArgs e)
        {
            _mouseOver = true;
            PerformNeedPaint(true);
            _maskedTextBox.Invalidate();
            base.OnMouseEnter(e);
        }

15. Example

Project: Krypton
Source File: KryptonMaskedTextBox.cs
protected override void OnMouseLeave(EventArgs e)
        {
            _mouseOver = false;
            PerformNeedPaint(true);
            _maskedTextBox.Invalidate();
            base.OnMouseLeave(e);
        }

16. Example

Project: Krypton
Source File: KryptonNumericUpDown.cs
private void InvalidateChildren()
        {
            if (NumericUpDown != null)
            {
                NumericUpDown.Invalidate();
                PI.RedrawWindow(Handle, IntPtr.Zero, IntPtr.Zero, 0x85);
            }
        }

17. Example

Project: Krypton
Source File: KryptonRichTextBox.cs
protected override void OnMouseEnter(EventArgs e)
        {
            _mouseOver = true;
            PerformNeedPaint(true);
            _richTextBox.Invalidate();
            base.OnMouseEnter(e);
        }

18. Example

Project: Krypton
Source File: KryptonRichTextBox.cs
protected override void OnMouseLeave(EventArgs e)
        {
            _mouseOver = false;
            PerformNeedPaint(true);
            _richTextBox.Invalidate();
            base.OnMouseLeave(e);
        }

19. Example

Project: Krypton
Source File: KryptonTextBox.cs
protected override void OnMouseEnter(EventArgs e)
        {
            _mouseOver = true;
            PerformNeedPaint(true);
            _textBox.Invalidate();
            base.OnMouseEnter(e);
        }

20. Example

Project: Krypton
Source File: KryptonTextBox.cs
protected override void OnMouseLeave(EventArgs e)
        {
            _mouseOver = false;
            PerformNeedPaint(true);
            _textBox.Invalidate();
            base.OnMouseLeave(e);
        }

21. Example

Project: Krypton
Source File: KryptonTreeView.cs
protected override void OnMouseEnter(EventArgs e)
        {
            _mouseOver = true;
            PerformNeedPaint(true);
            _treeView.Invalidate();
            base.OnMouseEnter(e);
        }

22. Example

Project: Krypton
Source File: KryptonTreeView.cs
protected override void OnMouseLeave(EventArgs e)
        {
            _mouseOver = false;
            PerformNeedPaint(true);
            _treeView.Invalidate();
            base.OnMouseLeave(e);
        }

23. Example

Project: Krypton
Source File: MyUserControl.cs
private void OnGlobalPaletteChanged(object sender, EventArgs e)
        {
            // Unhook events from old palette
            if (_palette != null)
                _palette.PalettePaint -= new EventHandler<PaletteLayoutEventArgs>(OnPalettePaint);

            // Cache the new IPalette that is the global palette
            _palette = KryptonManager.CurrentGlobalPalette;

            // Hook into events for the new palette
            if (_palette != null)
                _palette.PalettePaint += new EventHandler<PaletteLayoutEventArgs>(OnPalettePaint);

            // Change of palette means we should repaint to show any changes
            Invalidate();
        }

24. Example

Project: Krypton
Source File: MyUserControl.cs
private void OnPalettePaint(object sender, PaletteLayoutEventArgs e)
        {
            // Palette indicates we might need to repaint, so lets do it
            Invalidate();
        }

25. Example

Project: Krypton
Source File: MyUserControl.cs
private void OnGlobalPaletteChanged(object sender, EventArgs e)
        {
            // Unhook events from old palette
            if (_palette != null)
                _palette.PalettePaint -= new EventHandler<PaletteLayoutEventArgs>(OnPalettePaint);

            // Cache the new IPalette that is the global palette
            _palette = KryptonManager.CurrentGlobalPalette;
            _paletteRedirect.Target = _palette;

            // Hook into events for the new palette
            if (_palette != null)
                _palette.PalettePaint += new EventHandler<PaletteLayoutEventArgs>(OnPalettePaint);

            // Change of palette means we should repaint to show any changes
            Invalidate();
        }

26. Example

Project: Krypton
Source File: MyUserControl.cs
private void OnPalettePaint(object sender, PaletteLayoutEventArgs e)
        {
            // Palette indicates we might need to repaint, so lets do it
            Invalidate();
        }

27. Example

Project: meridian59-dotnet
Source File: Map.cs
public new void Invalidate()
        {
            float deltax = 0.5f * zoom * (float)Width;
            float deltay = 0.5f * zoom * (float)Height;
 
            // update box boundaries (box = what to draw from map)
            boxMin.X = center.X - deltax;
            boxMin.Y = center.Y - deltay;
            boxMax.X = center.X + deltax;
            boxMax.Y = center.Y + deltay;

            base.Invalidate();
        }

28. Example

Project: Cyotek.Windows.Forms.ColorPicker
Source File: ColorGrid.cs
public virtual void EndUpdate()
    {
      if (_updateCount > 0)
      {
        _updateCount--;
      }

      if (this.AllowPainting)
      {
        this.Invalidate();
      }
    }

29. Example

Project: Cyotek.Windows.Forms.ColorPicker
Source File: ColorWheel.cs
public virtual void EndUpdate()
    {
      if (_updateCount > 0)
      {
        _updateCount--;
      }

      if (this.AllowPainting)
      {
        this.Invalidate();
      }
    }

30. Example

Project: ImageGlass
Source File: ImageBox.cs
public virtual void EndUpdate()
        {
            if (_updateCount > 0)
            {
                _updateCount--;
            }

            if (AllowPainting)
            {
                Invalidate();
            }
        }

31. Example

Project: ImageGlass
Source File: ImageBox.cs
private void OnFrameChangedHandler(object sender, EventArgs eventArgs)
        {
            Invalidate();
        }

32. Example

Project: VisualPlus
Source File: VisualTabPage.cs
public void UpdateProperties()
        {
            try
            {
                Invalidate();
            }
            catch (Exception e)
            {
                throw new Exception(e.StackTrace);
            }
        }

33. Example

Project: VisualPlus
Source File: VisualListBox.cs
private void ListBox_GotFocus(object sender, EventArgs e)
        {
            _listBox.Invalidate();
            OnGotFocus(e);
        }

34. Example

Project: VisualPlus
Source File: VisualListBox.cs
private void ListBox_KeyDown(object sender, KeyEventArgs e)
        {
            _listBox.Invalidate();
            OnKeyDown(e);
        }

35. Example

Project: VisualPlus
Source File: VisualListBox.cs
private void ListBox_LostFocus(object sender, EventArgs e)
        {
            _listBox.Invalidate();
            OnLostFocus(e);
        }

36. Example

Project: VisualPlus
Source File: VisualListBox.cs
private void ListBox_MouseDown(object sender, EventArgs e)
        {
            _listBox.Invalidate();
        }

37. Example

Project: VisualPlus
Source File: VisualTextBox.cs
protected override void OnInvalidated(InvalidateEventArgs e)
        {
            base.OnInvalidated(e);

            // Check if there is a watermark
            if (_waterMarkContainer != null)
            {
                // if there is a watermark it should also be invalidated();
                _waterMarkContainer.Invalidate();
            }
        }

38. Example

Project: VisualPlus
Source File: VisualComboBox.cs
public void UpdateTheme(Styles style)
        {
            _styleManager = new VisualStyleManager(Settings.DefaultValue.DefaultStyle);

            _border.Color = _styleManager.ShapeStyle.Color;
            _border.HoverColor = _styleManager.BorderStyle.HoverColor;

            Font = _styleManager.Font;
            _foreColor = _styleManager.FontStyle.ForeColor;
            _textDisabledColor = _styleManager.FontStyle.ForeColorDisabled;

            _backColorState = new ColorState
                {
                    Enabled = _styleManager.ControlStyle.BoxEnabled,
                    Disabled = _styleManager.ControlStyle.BoxDisabled
                };

            _buttonColor = _styleManager.ControlStyle.FlatButtonEnabled;
            _menuTextColor = _styleManager.FontStyle.ForeColor;

            _menuItemNormal = _styleManager.ControlStyle.ItemEnabled;
            _menuItemHover = _styleManager.ControlStyle.ItemHover;

            _borderEdge.BackColor = _styleManager.ControlStyle.Line;

            Invalidate();
        }

39. Example

Project: VisualPlus
Source File: VisualTrackBar.cs
public void Decrement(int value)
        {
            if (Value > Minimum)
            {
                Value -= value;
                if (Value < Minimum)
                {
                    Value = Minimum;
                }
            }
            else
            {
                Value = Minimum;
            }

            Invalidate();
        }

40. Example

Project: VisualPlus
Source File: VisualTrackBar.cs
public void Increment(int value)
        {
            if (Value < Maximum)
            {
                Value += value;
                if (Value > Maximum)
                {
                    Value = Maximum;
                }
            }
            else
            {
                Value = Maximum;
            }

            Invalidate();
        }

41. Example

Project: VisualPlus
Source File: VisualTrackBar.cs
public new void SetRange(int minimumValue, int maximumValue)
        {
            Minimum = minimumValue;

            if (Minimum > Value)
            {
                Value = Minimum;
            }

            Maximum = maximumValue;

            if (Maximum < Value)
            {
                Value = Maximum;
            }

            if (Maximum < Minimum)
            {
                Minimum = Maximum;
            }

            Invalidate();
        }

42. Example

Project: VisualPlus
Source File: VisualTrackBar.cs
protected override void OnMouseUp(MouseEventArgs e)
        {
            _leftButtonDown = false;
            _mouseState = MouseStates.Normal;
            Capture = false;
            Invalidate();
        }

43. Example

Project: VisualPlus
Source File: VisualTrackBar.cs
protected override void OnResize(EventArgs e)
        {
            Invalidate();
        }

44. Example

Project: VisualPlus
Source File: VisualTrackBar.cs
protected override void OnValueChanged(EventArgs e)
        {
            Invalidate();
        }

45. Example

Project: ClientServerProject
Source File: FormDownloading.cs
private void Time_Tick(object sender, EventArgs e)
        {
            Pen_Offect--;
            if (Pen_Offect < -5) Pen_Offect = 4;
            pen_dash.DashOffset = Pen_Offect;
            Invalidate();//????
        }

46. Example

Project: ClientServerProject
Source File: FormMatterRemind.cs
private void Time_Tick(object sender, EventArgs e)
        {
            Pen_Offect--;
            if (Pen_Offect < -5) Pen_Offect = 4;
            pen_dash.DashOffset = Pen_Offect;
            Invalidate();//????
        }

47. Example

Project: ig-memtrace
Source File: MemBlockView.cs
public void SetBlock(ulong start, ulong end, List<FragAllocData> allocs)
    {
      m_Allocs = allocs;
      m_LoAddress = (long) start;
      m_HiAddress = (long) end;

      m_BitmapValid = false;
      Invalidate();
    }

48. Example

Project: MapleShark
Source File: DockPanel.cs
private void InvalidateWindowRegion()
        {
            if (DesignMode)
                return;

            if (m_dummyControlPaintEventHandler == null)
                m_dummyControlPaintEventHandler = new PaintEventHandler(DummyControl_Paint);

            DummyControl.Paint += m_dummyControlPaintEventHandler;
            DummyControl.Invalidate();
        }

49. Example

Project: NSMB-Editor
Source File: NotesCtrl.cs
private void NotesCtrl_MouseEnter(object sender, EventArgs e)
        {
            hovered = true;
            Invalidate();
        }

50. Example

Project: NSMB-Editor
Source File: NotesCtrl.cs
private void NotesCtrl_MouseLeave(object sender, EventArgs e)
        {
            hovered = false;
            Invalidate();
        }