Thank you very much, Lyubo.

Does your implementation of PreviewMouseScroll event look like this:
private void diagram_PreviewMouseWheel (object sender, MouseWheelEventArgs e)
{
var zoomRect = diagram.Viewport;
if (diagram.Bounds.Width> = zoomRect.Width && diagram.Bounds.Height> = zoomRect.Height)
diagram.ZoomToRect (zoomRect, true);
if (e.Delta <0)
zoomRect.Inflate (10, 10);
else
zoomRect.Inflate (-10, -10);
diagram.ZoomToRect (zoomRect, true);
e.Handled = true;
}
I currently want to use the values of the two TextBoxes as the length and width of the overlayNode. The code is as follows:
private void RibbonButton_Click (object sender, RoutedEventArgs e)
{
if (overlayNode == null)
return;
double x = overlayNode.Bounds.X,
y = overlayNode.Bounds.Y;
// Get the new values from the 2 text boxes
double newValue;
if (double.TryParse (textBoxX.Text, out newValue))
x = newValue;
if (double.TryParse (textBoxY.Text, out newValue))
y = newValue;
var newBounds = new Rect (imageNode.Bounds.Right-x, imageNode.Bounds.Bottom-y, x, y);
// Change the node's position / dimensions
overlayNode.SetBounds (newBounds, true, true);
}
The result is that the overlayNode has only changed, but no transparency effect has occurred in its size range. The transparency effect is still the 200 size set previously, and I want to remove the border of the overlayNode. What changes do I need to make?