Provides data for the SftStyle.Styling event.
Namespace: Softelvdm.SftStyleNET
Assembly: Softelvdm.SftStyleNET
Inheritance
public class StylingEventArgs : System.ComponentModel.CancelEventArgs;
Public Class StylingEventArgs
Inherits System.ComponentModel.CancelEventArgsThis class cannot be instantiated.
![]() ![]() | Cancel | Gets or sets a value indicating whether the event should be canceled. |
![]() | Control | Returns the control about to be styled. |
![]() ![]() ![]() | Empty | Provides a value to use with events that do not have event data. |
![]() ![]() | Equals | Determines whether the specified object is equal to the current object. |
![]() ![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. |
![]() ![]() | GetHashCode | Serves as the default hash function. |
![]() ![]() | GetType | Gets the Type of the current instance. |
![]() ![]() | MemberwiseClone | Creates a shallow copy of the current Object. |
![]() ![]() ![]() | ReferenceEquals | Determines whether the specified Object instances are the same instance. |
![]() ![]() | ToString | Returns a string that represents the current object. |
DumpValues("sftStyle1.DarkModeChanged (" + (sftStyle1.DarkModeActive ? "dark" : "light") + ")", e);
}
private void sftStyle1_HighContrastChanged(object sender, EventArgs e) {
DumpValues("sftStyle1.HighContrastChanged (" + (sftStyle1.HighContrastActive ? "on" : "off") + ")", e);
}
// 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);
DumpValues("SftStyle1.DarkModeChanged (" + If(SftStyle1.DarkModeActive, "dark", "light") + ")", e)
End Sub
Private Sub SftStyle1_HighContrastChanged(ByVal sender As Object, ByVal e As EventArgs) Handles SftStyle1.HighContrastChanged
DumpValues("SftStyle1.HighContrastChanged (" + If(SftStyle1.HighContrastActive, "on", "off") + ")", e)
End Sub
' 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)See Also Classes | SftStyle/NET 3.0