Reference Silverlight 4 control from Silverlight 3
Short Question:
If I have a Silverlight application built in SL3 can I detect at runtime if the client is using SL4 and use the Cursors.NESW that is only available in SL4?
More Info:
I have a Silverlight application built using Silverlight 3. I'd like to display a cursor Cursors.SizeNESW in my application. The way I was doing it was to set the Cursor to Cursors.None and display a NESW image in place of the curs开发者_如何学运维or.
However, on Safari on a Mac this causes an issue - Silverlight is running in windowless mode, and if I put an iframe that covers the silverlight app and the cursor is set to none in the silverlight app - then mousing over the iframe will cause the cursor to disappear. I suspect my image cursor is being displayed in the Silverlight underneath the iframe.
Due to business reasons, upgrading to Silverlight 4 for the PC version probably won't happen soon. However, we've had to require Silverlight 4 on the Mac anyway to fix this issue.
I don't think it is possible to mix versions. A project is compiled either SL3 OR SL4. You'd have to have two different versions of your application.
This question has information on detecting a client's runtime version of Silverlight:
Version detection with Silverlight
精彩评论