public void Redraw() { if (null != _container) { bool CurrentState = _container.OptionSelected(this); SelectableOptionImage img = Picture as SelectableOptionImage; if (null != img) { bool oldState = img.Enabled; img.Enabled = CurrentState; } } foreach (SKCanvasView CV in _views) { CV.InvalidateSurface(); } }
public bool Toggle() { if (null != _container) { bool CurrentState = _container.ToggleOption(this); SelectableOptionImage img = Picture as SelectableOptionImage; if (null != img) { bool oldState = img.Enabled; img.Enabled = CurrentState; return(oldState != CurrentState); } // Assume something changed return(true); } // No container - no toggling. return(false); }