Example #1
0
            protected override void LoadComplete()
            {
                base.LoadComplete();

                // the following handlers aren't fired immediately to avoid mutating Current by accident when ran prematurely.
                // if necessary, they will run when the Current value change callback fires at the end of this method.
                Hue.BindValueChanged(_ => debounce(hueChanged));
                Saturation.BindValueChanged(_ => debounce(saturationChanged));
                Value.BindValueChanged(_ => debounce(valueChanged));

                // Current takes precedence over HSV controls, and as such it must run last after HSV handlers have been set up for correct operation.
                Current.BindValueChanged(_ => currentChanged(), true);
            }