我试图在按钮单击事件后显示 ZoomRectangle (固定大小和跟随鼠标),但我在文档中找不到任何内容。
有任何想法吗?
OxyRect lens;
private void button2_Click(object sender, EventArgs e)
{
lens = new OxyRect(0, 0, tempPlot.Width / 4, tempPlot.Height / 4);
tempPlot.ShowZoomRectangle(lens);
tempPlot.MouseMove += new System.Windows.Forms.MouseEventHandler(this.plot_MouseMove);
}
private void panelTemp_MouseMove(object sender, MouseEventArgs e)
{
lens.Left = e.X;
lens.Top = e.Y;
}