System.Windows.Forms.Control.UpdateStyles()

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

12 Examples 7

1. Example

Project: Cyotek.Windows.Forms.ImageBox
Source File: ScrollControl.cs
protected virtual void OnBorderStyleChanged(EventArgs e)
    {
      EventHandler handler;

      base.UpdateStyles();

      handler = this.BorderStyleChanged;

      if (handler != null)
      {
        handler(this, e);
      }
    }

2. Example

Project: ImageGlass
Source File: ImageBox.cs
protected virtual void OnBorderStyleChanged(EventArgs e)
        {
            EventHandler handler;

            base.UpdateStyles();

            handler = BorderStyleChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }

3. Example

Project: HTML-Renderer
Source File: HtmlLabel.cs
protected virtual void OnBorderStyleChanged(EventArgs e)
        {
            UpdateStyles();

            var handler = BorderStyleChanged;
            if (handler != null)
                handler(this, e);
        }

4. Example

Project: HTML-Renderer
Source File: HtmlPanel.cs
protected virtual void OnBorderStyleChanged(EventArgs e)
        {
            UpdateStyles();

            var handler = BorderStyleChanged;
            if (handler != null)
            {
                handler(this, e);
            }
        }

5. Example

Project: ErrorControlSystem
Source File: ScrollControl.cs
protected virtual void OnBorderStyleChanged(EventArgs e)
    {
      EventHandler handler;

      base.UpdateStyles();

      handler = this.BorderStyleChanged;

      if (handler != null)
      {
        handler(this, e);
      }
    }

6. Example

Project: PdfViewer
Source File: CustomScrollControl.cs
private bool SetVisibleScrollbars(bool horiz, bool vert)
        {
            bool needLayout = !horiz && HScroll || horiz && !HScroll || !vert && VScroll || vert && !VScroll;

            if (needLayout)
            {
                int x = _displayRect.X;
                int y = _displayRect.Y;

                if (!horiz)
                    x = 0;
                if (!vert)
                    y = 0;

                SetDisplayRectLocation(x, y);
                HScroll = horiz;
                VScroll = vert;

                //Update the visible member of ScrollBars....
                if (horiz)
                    _horizontalScroll.Visible = true;
                else
                    ResetScrollProperties(_horizontalScroll);
                if (vert)
                    _verticalScroll.Visible = true;
                else
                    ResetScrollProperties(_verticalScroll);

                UpdateStyles();
            }

            return needLayout;
        }

7. Example

Project: PdfiumViewer
Source File: CustomScrollControl.cs
private bool SetVisibleScrollbars(bool horiz, bool vert)
        {
            bool needLayout = !horiz && HScroll || horiz && !HScroll || !vert && VScroll || vert && !VScroll;

            if (needLayout)
            {
                int x = _displayRect.X;
                int y = _displayRect.Y;

                if (!horiz)
                    x = 0;
                if (!vert)
                    y = 0;

                SetDisplayRectLocation(x, y);
                HScroll = horiz;
                VScroll = vert;

                //Update the visible member of ScrollBars....
                if (horiz)
                    _horizontalScroll.Visible = true;
                else
                    ResetScrollProperties(_horizontalScroll);
                if (vert)
                    _verticalScroll.Visible = true;
                else
                    ResetScrollProperties(_verticalScroll);

                UpdateStyles();
            }

            return needLayout;
        }

8. Example

Project: Mist
Source File: MetroTabControl.cs
[SecuritySafeCritical]
        protected override void OnFontChanged(EventArgs e)
        {
            base.OnFontChanged(e);
            IntPtr hFont = MetroFonts.TabControl(metroLabelSize, metroLabelWeight).ToHfont();
            SendMessage(this.Handle, WM_SETFONT, hFont, (IntPtr)(-1));
            SendMessage(this.Handle, WM_FONTCHANGE, IntPtr.Zero, IntPtr.Zero);
            this.UpdateStyles();
        }

9. Example

Project: MapleShark
Source File: BaseControl.cs
protected override unsafe void WndProc(ref Message m)
        {
            if (m.Msg == (int) Windo/n ..... /n //View Source file for more details /n }

10. Example

Project: MapleShark
Source File: BaseListBoxControl.cs
protected override unsafe void WndProc(ref Message m)
        {
            if (m.Msg == (int) Windo/n ..... /n //View Source file for more details /n }

11. Example

Project: MapleShark
Source File: BasePanelControl.cs
protected override unsafe void WndProc(ref Message m)
        {
            if (m.Msg == (int) Windo/n ..... /n //View Source file for more details /n }

12. Example

Project: Legends-Viewer
Source File: DwarfTabControl.cs
protected override void OnFontChanged(EventArgs e)
        {
            base.OnFontChanged(e);
            IntPtr hFont = this.Font.ToHfont();
            SendMessage(this.Handle, WM_SETFONT, hFont, new IntPtr(-1));
            SendMessage(this.Handle, WM_FONTCHANGE, IntPtr.Zero, IntPtr.Zero);
            this.UpdateStyles();
        }