Why is the viewbox's actualwidth growing much faster than it actually is?

182 Views Asked by At

A common issue with some controls in ViewBoxes is that they don't stretch to fill the Viewbox, so I tried to fix that with this code:

Public Sub WindowResized() Handles Me.SizeChanged
    ComboBox_transfer_from.Width = Viewbox_transfer_from.ActualWidth
End Sub

It seems to work fine, at first. But the Viewbox's ActualWidth reports values that change much faster than they actually are. It starts out at 74, but making it a pixel wider makes it instantly jump to nearly 140, and then another pixel makes it jump to about 260. Then it goes to over 400 and just stays at this value.

Any idea what's going on here?

0

There are 0 best solutions below