ComponentOne Sizer for WinForms
C1.Win.Sizer.6 Assembly / C1.Win.Sizer Namespace / C1SizerLight Class / ResizingFont Event
Example

In This Topic
    ResizingFont Event (C1SizerLight)
    In This Topic
    Fires before the C1SizerLight resizes the font in a control in response to the form being resized.
    Syntax
    'Declaration
     
    Public Event ResizingFont As C1SizerLightEventHandler
    public event C1SizerLightEventHandler ResizingFont
    Event Data

    The event handler receives an argument of type C1SizerLightEventArgs containing data related to this event. The following C1SizerLightEventArgs properties provide information specific to this event.

    PropertyDescription
    Determines whether the font for this control should be resized.  
    Gets a reference to the control whose font is about to be resized by the C1SizerLight component.  
    Remarks

    By default, C1SizerLight will resize all child controls on a form and will also update their fonts when the form is resized.

    In some cases, you may want to prevent the C1SizerLight from resizing the font for certain controls on the form. For example, scrollable controls often don't need font resizing. When their dimensions change, the user can still scroll to view their contents.

    Example
    For example, the code below prevents the C1SizerLight from resizing the font on any controls that are not Buttons:
    void c1SizerLight1_ResizingFont(object sender, C1SizerLightEventArgs e)
    {
        if (!(e.Control is Button))
            e.Cancel = true;
    }
    See Also