private void MoveThumb( Thumb thumb, Point position )
{
var element = AdornedElement as FrameworkElement;
position = new Point( position.X * element.ActualWidth, position.Y * element.ActualHeight );
**var halfSize = (Vector)thumb.DesiredSize / 2;**
thumb.Arrange( new Rect( position - halfSize, position + halfSize ) );
}
This is the VB.net I am able to convert:
Private Sub MoveThumb(ByVal thumb As Thumb, ByVal position As Point)
Dim element = TryCast(AdornedElement, FrameworkElement)
position = New Point(position.X * element.ActualWidth, position.Y * element.ActualHeight)
Dim halfSize As Object = DirectCast(thumb.DesiredSize, Vector) / 2
thumb.Arrange(New Rect(position - halfSize, position + halfSize))
End Sub
It is saying unable to convert window.size to window.vector
Can anyone help me with this.
thanks,