Yeah you can do direct References via normal means in VS projects - or - you can do linked files via VS as well.. as for example a Silverlight Class library is different to a normal standalone Class Library (ie template wise via VS2008). So if you created a generic Class Library in a WPF project and it makes basic references but later you wanted to import that into a Silverlight project, it at times spits the dummy (as it makes references to different system.windows.controls or something like that - forget exactly where). So you can then just import that specific file via Add As Linked File vs Add Existing Item.. so you effectively have one file in both sets of projects..
Now in Sl4/VS2010 I don't think that's a problem (haven't checked). From: [email protected] [mailto:[email protected]] On Behalf Of .net noobie Sent: Tuesday, May 18, 2010 3:07 PM To: ozSilverlight Subject: Re: Long running animation I am helping on the DeepEarth control originally created in SL2, so originally never not intended to work on a WP7 the other day, took out the ref's to the Browser.dll and a coulple minor changes, (e.g. make it SL3 etc for the emulator) and BOOM!!!, works on WP7 emulator in VS2010 pretty cool stuff :) On Tue, May 18, 2010 at 2:38 PM, Scott Barnes <[email protected]<mailto:[email protected]>> wrote: Yeah, The mandate for Silverlight/WPF/WP7 teams is to keep all bits as close to parity with one another as humanly possible. There are still going to be forks in the road and this has to do with hosting platform/device and also security (ie obvious example is WPF vs Silverlight, WPF has Windows SDK at its disposable where as Silverlight has to ask pretty please first etc). The API's etc will be consistent mainly for developer mindshare but also creates less work for the VS + Expression team in terms of tooling. In theory you could have a shared library (basic implementation mind you) that can be re-used in Desktop, Web and Phone (as long as you don't bring in specific references to DLL's that aren't available on either 3). One platform to rule them all! :) I miss being the Prod Manager for all of this.. but I like my wallet being filled and living in Australia way to much :) heheheh - Scott Barnes Ex-Rich Platforms Product Manager - Microsoft. From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of .net noobie Sent: Tuesday, May 18, 2010 2:20 PM To: ozSilverlight Subject: Re: Long running animation I see, thanks so in a nutshell, really these differences are hopefully (buy the sounds of it) more to try make the experiance more similar on which ever location your app is running, without the developer having to worry so much about it...??? I hope i am assuming this correctly, becuase that sounds quite nice :) the concept of my Browser Silverlight code, can pretty much just slip over to the WP7 is very cool stuff thanks, Silverlight RULES I think, love it :) On Tue, May 18, 2010 at 1:04 PM, Scott Barnes <[email protected]<mailto:[email protected]>> wrote: Correct. Silverlight was the first runtime to have multi-threading (although it still at times goes unused... we have a Ferrari people!..drive..drive and be free!) I've not read the actual guidance papers yet on Windows Phone 7, but from the initial early specs I glanced at they did specific that the Silverlight runtime would be the same on all devices/platforms (ie that's why it went from the SLR to the CLR in v3) and simply have reduced API's etc for certain situations (ie movie codecs are adjusted to suite the device etc). The main point is though it's supposed to act and breathe the same way you would expect it on the desktop, it's just under the hood they may have to substitute pieces to make them palatable for the device. As for specifically whether or not it uses a different threading management algorithm it's probably the case given the phone's probably going to have a different way of handling garbage collection than say a desktop? Bloody good question though, Tim Heuer may have access to the specifics here? As for perf desktop vs mobile. Definitely as this is probably Adobe's biggest annoyance in that folks expect to do the same crazy stuff they do on a desktop on the phone but forget to balance out CPU cycles as whilst technically you can run mad with animations and iterations until you reduce your machine to weeping mess (all you would see is Windows gray out the application and declare it a fail). On the device it may do the same for the extreme end of it all, but each time you kick off a CPU cycle you're effectively taking a slice out of the battery so whilst technically and semantically your app is going to run fine on both devices you still need to rethink your approach. For example. On the iPhone I have Scrabble and it came from apparently a flash->iphone cross compile. Now nothing bad about that per say but It appears it hasn't been optimized for the iPhone in that it plays a 2-3 sec video animation before it loads (credits etc) and then it uses animations / visual effects a lot throughout the game... Now iPhone's don't have a good battery life at the best of times then to have these folks steal more cpu cycles for gratuitous animations etc just isn't cricket for me..as after 3 games on a full battery at the start, I'm then reduced to almost the last 30% ... Very annoying. From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of .net noobie Sent: Tuesday, May 18, 2010 12:52 PM To: ozSilverlight Subject: Re: Long running animation ok thanks... my explination is primitive in i know... I mean't by stall, more like something causes the application to run slow, for whatever reason... in the frame base you continue as is... from where you are in the sequence time based you continue from where you "should be" in the sqeuence related to the time passed but maybe it is not really possible explain it correctly in such a basic way? the other thing about SL animations.... different kinds are running on different SL threads correct?, i assume this is more something you going to worried about as you animations are more and more complicated and using more complaicated objects to animate the one thing i was wondering about was that these are actually a bit different depending on weather you are running in a Web Browser or in the Windows Phone 7, these animations are potentially using different threads in Silverlight it's self depending on where it's running... correct? so when things get complicated/large do you think people will need to take this into condiseration and/or cause a few potential proformance issues when someone wants to take the SL app they built for the Web Browser and start wanting to run it on the Windows Phone... thanks On Tue, May 18, 2010 at 12:26 PM, Scott Barnes <[email protected]<mailto:[email protected]>> wrote: Not really you can thread inside frame based solutions (ie flash) (ie two movie clips playing at once is two separate threads feeding off the one frame queue). The only way you can stall on a single frame is a global exception / fault is thrown and even then it can sometimes let other clips keep playing.. The reason why Silverlight went with time based animation is simply because its more precise. The downside with frame based approach is you rely on Frames Per Second to be the conductor in that if you have 12 fps and your expecting your animation to play on the 13th frame, well in 1sec needs to occur before you can.. if you tell the app to run at 24fps well the 13th frame will be played sooner and so on.. it's really a messy way of animating. Not only that but when you rely on FPS it gets harder to multi-thread as from memory a FPS approach creates a hard-coded choke point where as animation by time is essentially atomic clock rationale :) From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of .net noobie Sent: Tuesday, May 18, 2010 12:15 PM To: ozSilverlight Subject: Re: Long running animation the difference between Silverlight and and Frame based animation.... in framed based.... you play the frames in order... 1,2,3,4,5,6,7,8,9 now if somthing happens while you in frame 2, this stalled your app for some period of time, the next frame to display is still frame 3, regardless of how long your app was stalled on frame 2 in Silverlight this is not the case...... when your app was held up on frame 2, silverlight will work out how many frames should have been show in this period and it will then show the correct frame for the "time/moment" your app is at after the hold up is over... so you might get frame 5, or 6 or where ever you animation should be at that "Time/Moment" this is my understanding of how SL animations are working On Tue, May 18, 2010 at 10:49 AM, Scott Barnes <[email protected]<mailto:[email protected]>> wrote: http://blogs.msdn.com/silverlight_sdk/archive/2008/03/24/create-an-animation-in-code.aspx http://www.developerfusion.com/article/10824/creating-particle-effects-in-silverlight/ Is a good start. Basically you don't have Frames in Silverlight, you have time. In flash you can use a frames per second methodology but in SL you simply use seconds/miliseconds etc. From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Greg Keogh Sent: Tuesday, May 18, 2010 10:40 AM To: 'ozSilverlight' Subject: Long running animation Folks, I want to create a sort of screen saver effect where a shape moves slowly around a control. The path it follows is calculated at start time by mixing random Sin/Cos functions, then the shape will follow the (x,y) coordinates of the function over time. It's like a moving parametric plot. I'm just not sure what coding technique to use for this effect. I'm guessing I'll need a frame-based animation, which I've never used before. It looks like it "pushes" events to you and you respond and move your elements, but it's not clear how you control the timing. I just want to run this idea past someone who's done it before and can confirm if I'm on the right track or not. I'll keep reading about frame-based animations in the meantime. Greg _______________________________________________ ozsilverlight mailing list [email protected]<mailto:[email protected]> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight _______________________________________________ ozsilverlight mailing list [email protected]<mailto:[email protected]> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight _______________________________________________ ozsilverlight mailing list [email protected]<mailto:[email protected]> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight _______________________________________________ ozsilverlight mailing list [email protected]<mailto:[email protected]> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
_______________________________________________ ozsilverlight mailing list [email protected] http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
