public void Dispose() { WpfGamePad.RemoveButtonRightStickDownHandler(_owner, OnHideLegend); WpfGamePad.RemoveThumbLeftChangeHandler(_owner, OnBlockPosChanged); WpfGamePad.RemoveThumbRightChangeHandler(_owner, OnRightThumbChanged); WpfGamePad.RemoveTriggerLeftChangeHandler(_owner, OnChangeCase); WpfGamePad.RemoveTriggerRightChangeHandler(_owner, OnChangeSymbols); WpfGamePad.RemoveButtonADownHandler(_owner, OnCharUp); WpfGamePad.RemoveButtonBDownHandler(_owner, OnCharRight); WpfGamePad.RemoveButtonXDownHandler(_owner, OnCharLeft); WpfGamePad.RemoveButtonYDownHandler(_owner, OnCharDown); WpfGamePad.RemoveDPadLeftDownHandler(_owner, OnMoveLeftDown); WpfGamePad.RemoveDPadRightDownHandler(_owner, OnMoveRightDown); WpfGamePad.RemoveDPadDownDownHandler(_owner, OnEnterDown); WpfGamePad.RemoveButtonStartDownHandler(_owner, OnEnterDown); WpfGamePad.RemoveButtonLeftShoulderDownHandler(_owner, OnDeleteDown); WpfGamePad.RemoveButtonRightShoulderDownHandler(_owner, OnSpaceDown); WpfGamePad.AddDPadLeftUpHandler(_owner, OnMoveLeftUp); WpfGamePad.AddDPadRightUpHandler(_owner, OnMoveRightUp); WpfGamePad.AddDPadDownUpHandler(_owner, OnEnterUp); WpfGamePad.AddButtonStartUpHandler(_owner, OnEnterUp); WpfGamePad.AddButtonLeftShoulderUpHandler(_owner, OnDeleteUp); WpfGamePad.AddButtonRightShoulderUpHandler(_owner, OnSpaceUp); }