WPF CheckBox UnCheck事件未触发

时间:2015-05-01 16:59:15

标签: wpf checkbox eventtrigger

我在ItemsControl中有一个复选框。它为Actor hitActor; boolean touched; @Override public boolean touchDown(int screenX, int screenY, int pointer, int button) { touched = true; touchVector = new Vector3(screenX,screenY,0); game.getCamera().unproject(touchVector); hitActor = stage.hit(touchVector.x,touchVector.y,false); } @Override public boolean touchDragged(int screenX, int screenY, int pointer) { // TODO Auto-generated method stub if(touched==true) { Actor hitDraggedActor; Vector3 touchVectorDragged = new Vector3(screenX,screenY,0); game.getCamera().unproject(touchVectorDragged); hitDraggedActor = stage.hit(touchVectorDragged.x,touchVectorDragged.y,false); if(hitDraggedActor!=hitActor) //<--i tried !hitDraggedActor.equals(hitActor) { Candy hitDraggedCandy = (Candy) hitDraggedActor; Candy hitCandy = (Candy) hitActor; //print attributes of hitDraggedCandy and hitCandy // result is similar when in fact, it should not //do something here } } @Override public boolean touchUp(int screenX, int screenY, int pointer, int button) { touched=false; return false; } Checked事件都有一个EventTrigger。它还绑定到具有多个UnChecked的{​​{1}}。 Command事件触发就好了。

但是,CommandParameters事件不会触发。我错过了什么?

Checked

1 个答案:

答案 0 :(得分:0)

正如@Bort指出的那样,事件名称应该是Unchecked而不是UnChecked