OxyPlot的PlotModel和PlotController组件包含自己的鼠标处理程序,您可以添加或删除自己的处理程序。对于实例:
this.Model.MouseMove += this.ModelOnMouseMove;
public void ModelOnMouseMove(object sender, OxyMouseDownEventArgs e)
{
// Do some mouse stuff...
}
模型是否有办法以类似方式捕获KeyBoard Key印刷机?
答案 0 :(得分:1)
OxyPlot显然有一个Model.Keydown Even Handler,它在PlotModel聚焦时触发。它似乎没有太多的文档:
this.Model.KeyDown += ModelOnKeyDown;
private void ModelOnKeyDown(object sender, OxyKeyEventArgs e)
{
if (e.Key == OxyKey.Up)
{
// Do Some Stuff
}
else if (e.Key == OxyKey.Down)
{
// Do Some Stuff
}
}