HeaderPane
Main
Hide
Share Link
Print

ScalingEventArgs Class

Provides data for the SftStyle.Scaling event.

Namespace: Softelvdm.SftStyleNET
Assembly: Softelvdm.SftStyleNET

Inheritance

Syntax

public class ScalingEventArgs : System.ComponentModel.CancelEventArgs;
Public Class ScalingEventArgs
    Inherits System.ComponentModel.CancelEventArgs

Constructors

This class cannot be instantiated.

Properties

PublicInherited from System.ComponentModel.CancelEventArgsCancelGets or sets a value indicating whether the event should be canceled.
PublicControlReturns the form or control about to be scaled.

Fields

PublicStaticInherited from System.EventArgsEmptyProvides a value to use with events that do not have event data.

Methods

PublicInherited from System.ObjectEqualsDetermines whether the specified object is equal to the current object.
ProtectedInherited from System.ObjectFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
PublicInherited from System.ObjectGetHashCodeServes as the default hash function.
PublicInherited from System.ObjectGetTypeGets the Type of the current instance.
ProtectedInherited from System.ObjectMemberwiseCloneCreates a shallow copy of the current Object.
PublicStaticInherited from System.ObjectReferenceEqualsDetermines whether the specified Object instances are the same instance.
PublicInherited from System.ObjectToStringReturns a string that represents the current object.

Examples

C# View entire sample code

        // Occurs for each control before it is styled; the event list can be left as it is.
        private void sftStyle1_Styling(object sender, StylingEventArgs e) {
            e.Cancel = checkLeaveList.Checked && e.Control == listView1;
            DumpValues("sftStyle1.Styling" + (e.Cancel ? " (left as it is)" : ""), e);
        }

        // Occurs on .NET Framework before a form or a control is scaled for the DPI of its monitor.
        private void sftStyle1_Scaling(object sender, ScalingEventArgs e) {
            DumpValues("sftStyle1.Scaling", e);
        }

        // sftSlider1 - a value; sftSlider2 - a range with two thumbs

        private void sftSlider1_ValueChanged(object sender, EventArgs e) {
            DumpValues("sftSlider1.ValueChanged (" + sftSlider1.Value + ")", e);
        }

VB.NET View entire sample code

    ' Occurs for each control before it is styled; the event list can be left as it is.
    Private Sub SftStyle1_Styling(ByVal sender As Object, ByVal e As StylingEventArgs) Handles SftStyle1.Styling
        e.Cancel = CheckLeaveList.Checked AndAlso e.Control Is ListView1
        DumpValues("SftStyle1.Styling" + If(e.Cancel, " (left as it is)", ""), e)
    End Sub

    ' Occurs on .NET Framework before a form or a control is scaled for the DPI of its monitor.
    Private Sub SftStyle1_Scaling(ByVal sender As Object, ByVal e As ScalingEventArgs) Handles SftStyle1.Scaling
        DumpValues("SftStyle1.Scaling", e)
    End Sub

    ' SftSlider1 - a value; SftSlider2 - a range with two thumbs

    Private Sub SftSlider1_ValueChanged(ByVal sender As Object, ByVal e As EventArgs) Handles SftSlider1.ValueChanged
        DumpValues("SftSlider1.ValueChanged (" + SftSlider1.Value.ToString() + ")", e)
    End Sub

See Also Classes | SftStyle/NET 3.0