Skip to content

reference callbacks

Usagirei edited this page Apr 10, 2018 · 2 revisions

Callbacks

Some Controls provide Bindable Callbacks.

The documentation for those callbacks may specify a Type inside angle brackets <Type>.

  • Typed Callbacks: functions that receive a parameter of Type JankyEventArgs<T>
  • Untyped Callbacks: functions that receive a parameter of Type JankyEventArgs

All callbacks provide the name of the calling Control, and in the case of Typed Callbacks, the previous and new value.

Example Code:

public class ViewModel {
   public static void UntypedCallback(JankyEventArgs args) {
      // args.Control
   }
   
   public static void TypedCallback(JankyEventArgs<float> args) {
      // Above plus 
      // args.NewValue
      // args.OldValue
   }
}