private void ChangeBlockEdgeCursor(Point point) { var left = AxisXConverter.DataToScreen(PointOutBlock.Start); var right = AxisXConverter.DataToScreen(PointOutBlock.End); //如果在边上,鼠标形状就发生变化 if ((point.X - left) < ApprochDistance) { LayerContainer.ChangeCursor(Cursors.SizeWE); FlagAdd(MouseState.LeftDirection); } else if ((right - point.X) < ApprochDistance) { LayerContainer.ChangeCursor(Cursors.SizeWE); FlagAdd(MouseState.RightDirection); } }