Windows Store App Visual Basic Rotate Object with code
Posted
by
Ajay Raghav
on Stack Overflow
See other posts from Stack Overflow
or by Ajay Raghav
Published on 2012-11-12T10:45:47Z
Indexed on
2012/11/12
11:00 UTC
Read the original article
Hit count: 362
How to rotate an ellipse (or any other object) with VB code? In XAML, I designed an ellipse and easily rotated it from the properties (Transform -> Rotate -> Angle). When I am trying to do it with VB code, I cannot locate the rotate/angle property of that ellipse. So, I tried this:
Dim Rotator As RotateTransform
Rotator.Angle = 90
Ellipse1.RenderTransform = Rotator
It didn’t work. It says:
Unable to cast object of type 'Windows.UI.Xaml.Media.MatrixTransform' to type 'Windows.UI.Xaml.Media.RotateTransform'.
I think I’m close to the right way. Please give me a push. Thanks
© Stack Overflow or respective owner