FreakySwitch - FreakyAli/Maui.FreakyControls GitHub Wiki

FreakySwitch is a custom control that provides a visually appealing switch with customizable colours and behaviours.

Properties

OutlineColor

  • Type: Color
  • Description: Gets or sets the color of the switch outline.

ThumbOffColor

  • Type: Color
  • Description: Gets or sets the on color of the switch thumb.

ThumbOnColor

  • Type: Color
  • Description: Gets or sets the off color of the switch thumb.

OnColor

  • Type: Color
  • Description: Gets or sets the color of the switch when it is in the "on" state.

OffColor

  • Type: Color
  • Description: Gets or sets the color of the switch when it is in the "off" state.

ToggledCommand

  • Type: ICommand
  • Description: Gets or sets the command to be executed when the switch is toggled.

IsToggled

  • Type: bool
  • Description: Gets or sets a value indicating whether the switch is in the "on" or "off" state.

AnimationDuration

  • Type: int
  • Description: Gets or sets the value for the animation duration in milliseconds

ThumbOffSizeFactor

  • Type: float
  • Description: Gets or sets the value of the thumb size factor when it is off.

ShowCheckMark

  • Type: bool
  • Description: Gets or sets the value that indicates if a checkmark should be shown when the switch is on.

CheckMarkWidth

  • Type: float
  • Description: Gets or sets the value that indicates the checkmark's width

CheckMarkColor

  • Type: Color
  • Description: Gets or sets the value that indicates the checkmark's color

Events

Toggled

  • Type: EventHandler<ToggledEventArgs>
  • Description: Raised when the switch is toggled between the "on" and "off" states.