tags:

views:

22

answers:

1

Can anyone point me in the direction of some information to understand this. I have a Canvas that displays an ellipse. I can move the ellipse around using the keyboard but I want to simulate a "jump", so I thought I'd use Newtons equations of motion to move the ellipse up and then down when the user presses the up arrow. All these equations are defined in metres where as the TranslateTransform on the UserControl is in pixels.

Can I get the resolution in SL to convert from metres to pixels?

+1  A: 

Not really, no. Silverlight doesn't understand pixels.

There are 96 units in an inch (no matter the dpi of the display). That suggests there are 3779.5 silverlight units in a metre. I'd think about applying a ScaleTransform to any area you're displaying so you can give Silverlight metres and get the right visuals out if that matters to you.

Alun Harford