Artur is developing an app in Windows Phone 8 using VB.net. He wants to move an image object slowly across the page. He is trying to manually change the margin of the image, and then implement a timer to transform it, but can’t figure out how.
Gergely Csúcs suggests that he use the
RenderTransform property while setting it to
TranslateTransform. Oliver Ulm agrees that he could do that, but thinks that the transformation is happening outside the layout calculations of the visual tree. Oliver adds that he could put the image control inside a Canvas control, which would give him access to the attached
DependencyProperties Top and Left. He suggests an example for animation which is supported in XAML, and demonstrates the usage of
TopProperty attached by Canvas control. He also clarifies that all CLR classes that are available in C# should also be available in VB.net as well, although the interfaces may sometimes differ a bit to accommodate language nuances.
Artur tries Oliver’s suggestion of putting Image control inside a Canvas control, and it works for him.
We featured this thread because it highlighted some good tricks for Image control.
See About Featured Discussion Board Posts for more information.
Keep those interesting questions coming!