WPF Canvas, accept mousewheel events -
i have custom canvascontrol draws ground plane. add new canvas canvascontrol draw on. setup mousewheel events.
canvas drawingcanvas = new canvas(); this.children.insert(0, drawingcanvas); mousewheel += new mousewheeleventhandler(groundplane_mousewheel); a lot of elements drawn drawingcanvas never changed (apart zoom modifications) means want set ishittestvisible = false improve performance (the gain massive) whilst still accepting mousewheel events on canvascontrol itself. unfortunately when lose ability use mousewheel. there i'm missing?
drawingcanvas.ishittestvisible = false;
in order input events directly on top level canvas, have set background property, example transparent:
background = brushes.transparent; mousewheel += groundplane_mousewheel;
Comments
Post a Comment