background preloader

Silverlight

Facebook Twitter

Framework

ImportedBookmarks. Mobile. Expression Blend and Design : 2.5D UserControl for Silverlight 2. 2.5D (two-and-a-half D) is a way of using 2D objects to give a very convincing illusion of 3D. I’ve provided an implementation that has no lighting, materials, lines or polygons. But it does enable you to locate 2D (that is, flat) objects at x,y,z coordinates and place the camera where you want it. The implementation then projects the objects onto the camera, scaling and translating them appropriately, and handles mouse input to move the camera.

You can see a small example demonstrating this below: Holding the left mouse button and moving the mouse rotates the camera; holding down Ctrl zooms; holding down Shift adjusts the field of view. Often, rotation causes an object to come in front of another, in terms of their distance from the camera. Anyway, you can download the source for the above project from the following location: You can use Expression Blend 2 SP1 and Visual Studio 2008 to dive into the app and see how Enjoy! Steve. Silverlight Unit Test Framework source code released - Jeff Wilc. A week ago, we gave the world the first release of the Silverlight Toolkit . Shawn Burke told you that we’re agile, and that we have a neat release model . The fun continues! Today, the source code to the Silverlight Unit Test Framework is available with the same open source license.

It is checked in to the source control for the toolkit on CodePlex. So, now you have more of the pieces to the toolkit story, in open source C#: controls and charting source code, unit tests source, unit test framework source. This is like a telescope pointing straight at what it has taken our team to be successful in delivering the controls to you. Having source access will give you the opportunity to innovate, meld the framework to meet your needs, and understand the internals.

Previous key posts about the framework to help anyone looking to get started: Test framework API documentation Test project templates for Silverlight 2 Visual Studio unit test framework introduction New features in the RC0/RTW release Simple. Updated Silverlight media player using VisualStateManager. I’ve just finished updating my modification of Joel’s original concept. Joel had a really great base for me to build off of and used styling and templates to create simple controls for a standard Silverlight media player that could be embedded.

I took his sample and made some minor adjustments to accommodate automatic sizing as well as make it a bit more parameter-driven. The end result was (what I think at least) a fairly nice player that could be flexible if needed: Joel made great use of styling primitive controls to be able to leverage core functionality rather than building it all himself. One of those controls used was the ToggleButton (the play/pause feature) which makes sense for the implementation. This worked fine in beta 1. One problem…the ToggleButton no longer supports MouseOver states specifically for Checked/Unchecked as we’ve implemented in the video player. This worked fine and they showed up in Blend designers as well for me to implement. Fair enough right? Tip of the Day #31: How to Detect Alt, Shift, Control, Windows a.

Skip to main content Silverlight Developer Center Sign in United States (English) © 2014 Microsoft. Silverlight Encryption (Part 1) So I'm working on a little application at the moment, where I want to store some stuff in Isolated Storage. The main issue i have is that I don't particularly want to leave the data in the clear, I really want to encrypt this data. So I knocked up a little test application which will allow me to encrypt data in a Silverlight application. A screenshot of the test application is below The test is simple, all i do is enter some text to encrypt, click on the encrypt button, and we get the encrypted data.

To ensure all is ok, I can take the encrypted string, and put it in the decryption textbox, click on decrypt and check the result matches my original string. In my next article, I will discuss in more detail how the code works. You can also view an online demo of this application here. Some Silverlight effects libraries.

While you can do a lot within Silverlight with effects, as demonstrated by techniques used like seen in Shine Draw, you may also want some helping hands to implement these. It’s not always fun to write some code for when you just want to be able to drop in an effect on your application. You want to concentrate on your application logic and get assistance in creating some of the visual effects. If you didn’t know, there are some libraries out there that can help. I’ll highlight two of them here (if you know of more, please post in the comments).

SvLite Effects from Cellbi This library from Cellbi provides various effects in their library that you can see on their demo site. Carousel Wipe effects Tweens (easing, bounce) and some bonus effects/controls (modal window for example) They are pretty interesting and you should check them out. Silverlight.FX from Nikhil Don’t know who Nikhil is? Fade Highlight Shake Pulse Spin Resize Move Composite Cross-fade Blinds Slide Flip. IsolatedStorage as a Silverlight object cache. Someone posed this question (“Can you use IsolatedStorage in Silverlight as a more reliable browser caching technique?”) To me and I answered with my usual optimistic “in theory, yes” answer. Of course I had never tried it which is horrible to answer that to someone without trying it. In working on creating some Silverlight business application samples, I figured I should probably look at this scenario to see if a) it would work and b) it makes sense. I’ll at least try to answer “a” here.

The Setup Let’s look at the setup. 1: private void Button_Click(object sender, RoutedEventArgs e) 3: panel1.Children.Clear(); 5: WebClient c = new WebClient(); 6: c.OpenReadCompleted += new OpenReadCompletedEventHandler(c_OpenReadCompleted); 7: c.OpenReadAsync(new Uri("DynamicXapDataGrid_CS.xap", UriKind.Relative)); 10: void c_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) 14: Deployment deploy = XamlReader.Load(appManifest) as Deployment; 16: Assembly asm = null; 27: else 7: if (! 13: else Sweet. Tip: Asynchronous Silverlight - Execute on the UI thread. This article is compatible with the latest version of Silverlight. I've been playing with some timers and Web Services and I got stuck in a case where the background thread was trying to update the UI. Well, that's never going to happen.

To update the UI you should use the UI thread. Let's see how we can call the UI thread from the background thread. Consider this situation: You have data that needs to be updated every minute. For the update you can use the Timer class. Timer t = new Timer( GetData, null , TimeSpan.Zero, new TimeSpan( 0, 1, 0 ) ); public void GetData( object stateInfo ) SampleWebServiceSoapClient client = new SampleWebServiceSoapClient(); client.HelloWorldCompleted += new EventHandler<HelloWorldCompletedEventArgs>( client_HelloWorldCompleted ); client.HelloWorldAsync(); private void client_HelloWorldCompleted( object sender, HelloWorldCompletedEventArgs e ) // update the UI Unfortunately this code doesn't work.

So what we should do to make this code work? 1. 2. Dispatcher class. Quick Silverlight Tip: How to access HTML DOM from Silverlight a. O UAU nosso de cada dia : você nunca assistiu nada assim: Smooth. Download details: Silverlight Installation Experience Paper and. :: blacklight.silverlight showcase :: Silverlight Hack - Silverlight 2.0 - Concepts to become a master. Intro Silverlight is THE next generation rich web technology to learn if you are a programmer focusing on delivering web content. There are many articles out there on how to get started or how to write your first Silverlight program. However, many of these articles fail to address the specific knowledge you need to master to be a truly effective Silverlight programmer.

Silverlight, just like any technology, has a concrete matrix of concepts a programmer should focus on in order to be able to call himself a master of the technology. Fifteen to twenty years ago (before the web, before mobile technology, before networks were prevalant, etc.), you could have an almost complete grasp of software engineering by focusing just on a few skills. As software engineering started to mature and the web blew the door off the amount of new technology/processes/patterns available, it became impossible to be an expert in every single facet of software development. Series Articles: