Silverlight

Free Typemock Licenses

Hands up – by blogging about this quickly, I may get a free typemock license.  All I have to do is post the text below!    *Begin* Unit Testing ASP.NET? ASP.NET unit testing has never been this easy. Typemock is launching a new product for ASP.NET developers – the ASP.NET Bundle - and for the launch will be giving out FREE licenses to bloggers and their readers. The ASP.NET Bundle is the ultimate ASP.NET unit testing solution, and offers both Typemock Isolator, a unit test tool and Ivonna,...

Silverlight for Mobile – further thoughts

Bart Czernicki had good post recently titled Silverlight 3 - Where is Silverlight Mobile? I thought a lot of the comments he made were spot on.  We have been lead up the garden path by the mobile team and in particular Amrit Chopra who has been announcing Silverlight for Mobile for 3 years now.  In fact I was expecting that he would announce it again at Mix year and then deliver nothing again!  Turns out he took a back seat in the 6.5 overview instead and no significant news on Silverlight Mobile was forthcoming. In my opinion though,...

Silverlight Pulse – a twitter silverlight app

Just a quick note to point you towards a little app I have been playing with to keep track of Silverlight news on Twitter.  Thought it might be interesting to keep an eye on this week with all the Silverlight announcements. This is a very early attempt at some ideas I have for a richer Silverlight Twitter app – [read more]  Cheers Ian Technorati Tags: Silverlight,Twitter

Brad Adams talks about “Silverlight 3 for Great Business Apps”

Robert Hess has a interesting chat with Brad Adams about silverlight 3 – this is a sneak peak of Brad’s session for Mix09, without, as he calls “the super secret stuff”. [read full article] Technorati Tags: Silverlight,LOB,Validation

Silverlight M-V-VM Resources

The Model-View-ViewModel pattern has been gaining a lot of popularity for WPF, and there have been a growing number of posts and resources about adapting it for Silverlight. This is a short summary post of some of those resources.  I will follow this up later with a detailed post on M-V-VM where I will also explore the business case for adopting such a design .. [read more] Cheers   Ian Technorati Tags: Silverlight,M-V-VM

Silverlight Visualisation Example – how much energy is wasted in US households?

This example was produced rather quickly in response to a challenge by Tim Heuer and shows the energy consumption of US households over the last few years and then predicted to 2030.  I was inspired by an article in National Geographic that I was reading, and it highlights I hope, the rather dramatic amount of energy is wasted through “electrical loss” (though I was a little disappointed from the visualisation point of view, how little the data changed in the prediction, made for a less dramatic animation!).  [read more] Windows Live Tags: Silverlight, Energy, Visualisation

Implementing Validation Logic in Silverlight 2

In Silverlight 3 we have seen that the Alexandria Framework will have a rich validation and business logic framework that is really very powerful and productive.  Silverlight 3 is due to be announced at Mix 09, and I would expect a CTP or Beta to be available then. But what can you do now?  Even if we get a go-live license on a SL 3 Beta it will be too early for many corporate teams to adopt.  This post will look at using Silverlight 2 and: ... Read full article ...

Silverlight Accessibility and creating DDA Compliant applications in the UK

[cross posted from: http://blackburnian.spaces.live.com/blog/cns!FB8B852EF1AB0B35!1917.entry] In the UK the DDA (The Disability Discrimination Act, 1995) makes it a legal requirement for service providers to ensure access for disabled customers and if necessary make reasonable adjustments to the way they deliver their services; this includes web sites (see Part III, 2.2, 4.7, 2.13-2.17, 5.23 and 5.26).  This almost certainly isn’t news to most of you, but I think there is a large degree of confusion about what creating a DDA Compliant site actually means, if not among the legal profession, it certainly appears to be among the development teams...

Silverlight Drag and Drop and HitTest on any layout (not just Canvas)

[Cross Posted from http://silverlightforbusiness.net ] A common requirement for a rich UI in a business application is to support dragging and dropping of UI elements.  For this to be successful you will need to be able to detect what elements you are dragging over, and you will need to support dragging over any type of layout (such as a complex grid layout), which is a contrast to many examples out there that only show dragging and dropping in relation to absolute layout with a Canvas. In addition many blogs appear to mention that the UIElement.HitTest method, available in...

Working with Data in Silverlight 2 (Entity Framework, Ado.Net Data Services, and DataGrid)

[Cross posted from: SilverlightForBusiness.net ] Since the announcement from Tim Mallalieu (Program Manager, LINQ to SQL and Entity Framework) that “as of NET 4.0 the Entity Framework will be our recommended data access solution for LINQ to relational scenarios” your first decision on how to get data into and out of your databases has been made easier: EF is the way to go when looking at solutions from Microsoft (of course you may still decide that you would prefer to use something else from a third party, perhaps LLBLGEN, or maybe a hand crafted solution?). But after that decision you still have...

Serializing Objects to Isolated Storage in Silverlight 2

[Cross posted from: SilverlightForBusiness.net ] Silverlight 2 does not have a BinaryFormatter like the full framework does so you have to take a different approach to serializing data to Isolated Storage. However there is a simple solution by using the DataContractSerializer.  You will need to add a reference to System.Runtime.Serialization.  This will serialize the object to an Xml format and is what Silverlight uses when you add a service reference. So if we have an object called Person, we can use the DataContract and DataMember attributes to mark it up as follows: [DataContract] public...

Announcing: Silverlight "Power Seminar"

Kings Hill Conference & Training Centre (location) Friday November 28th, 2008 (10am-1pm) I am presenting this seminar in Kings Hill on November 28th – should be a good overview and I will be drilling into some depth with the demo’s later on. Hope you can make it. Marketing info and content below ;-)   Don't miss this opportunity for your company to get a great insight into this exciting technology and how it can affect your business Special Offer ...

Silverlight 2 vs. Asp.Net Ajax

Shameless plug for my new blog:  silverlightforbusiness.net And the latest article:  Silverlight 2 vs. Asp.Net Ajax Cheers Ian Technorati Tags: Silverlight,asp.Net Ajax

New SilverlightForBusiness.net Blog

Most developers and managers are impressed with Silverlight when they first see it, and most are keen see what it can do.  Most see the immediate benefits for rich web based UI, and often there is a comparison drawn with Flash (“Is Silverlight a Flash Killer?”).  However the business case is not always clear to them. I believe Silverlight offers a tremendous platform for Business Applications It’s not just the richness of the UI and the wide reach and lower maintenance of the web deployment, but the fact that it is built in managed .net code, with a...

Creating Reusable Animations in Silverlight 2

I answered a post on the Silverlight forums recently about creating reusable animations for an Image, and thought that it was worth a blog entry to expand on it a little. I am looking here at two common approaches to creating reusable animations within a single project: Create the animation in xaml (using Blend) on one element and then change the target in code.  This is easier to do but means you can only play one animation at a time (because only one animation actually exists) ...

Silverlight 2 Enterprise application framework

If you have wondered about how Silverlight 2 will fit into your enterprise application, then Rockford Lhotka has just strengthened the (in my opinion) inevitable case for Silverlight 2 becoming the de-facto standard for web based enterprise apps over the next few years. He has just ported his popular Windows CLSA.Net framework to Silverlight, and has maintained a coherence between Windows and Silverlight.  As he says: The commonality between the two framework implementations allows sharing of business object code between .NET and Silverlight, while the differences allow you to exploit the power of the two...

Debugging Wcf Services in Silverlight 2

The current Beta 2 release of Silverlight 2 is not very informative when there is an error from a Wcf service that you have referenced. Currently all errors materialize in a http 404 no matter what their origin and you will end up seeing something like this: To get the real exceptions you will need to wait for the final version of Silverlight 2, but for now you can use WCF diagnostics to help you out. In your web app that is hosting the service, right click on web.config and select Edit Wcf Configuration (I don't see this...

Storing Images in Isolated Storage. A Silverlight 2 "Image Browser" example

Isolated storage offers a great opportunity to improve performance for locally cached data.  Instead of reading data from the server you can store it locally in the protected storage available to Silverlight.  Images seem like a good use for this, but it is not as easy as you may expect in the current build.  Here is a simple image browser example that walks through some of the ideas. In this example we will: See how to use the FileOpenDialog to allow the users to select image files from their hard drive Save those files into Isolated Storage...

Google Chrome JavaScript Performance

Chrome makes a case in their "launch comic" that JavaScript performance can be vastly improved over current browsers, and go into some detail about how they achieve that.  I decided to test it using the bubblemark site which provides a simple metric for various RIA technologies. Using the DHTML test I ran the page on IE7, FF3, Safari for Windows, and Chrome.  Here are the results: Browser DHTML Score for 16 balls (Lenovo T61p Vista x64 4Gb Ram) IE7 62 fps Safari 55fps Firefox 3 74 fps Chrome 136 fps That's a significant...

Easy Custom Installation Experience for Silverlight 2

The default installation experience for Silverlight 2 can be a bit confusing for your average web user:  they may not have heard of Silverlight and will not understand why they should install it when faced with the following: There is nothing intrinsically wrong with the button, it just that you really need to supplement this with an explanation of how their experience will improve for your site if they do install Silverlight.  With the Asp.Net Silverlight control you can easily provide a custom installation experience using the PluginNotInstalledTemplate: <asp:Silverlight ID="Xaml1" Windowless="true" PluginBackground="Transparent" runat="server" Source="~/ClientBin/SilverlightInstallExperience.xap"...

Excellent Silverlight Video from Mike Taulty

The always informative Mike Taulty gave an excellent talk at the UK Silverlight User Group in London on Thursday, called "No Silverlight Application is an Island". I often looks at Mike's video synopsis and think that I have that all covered, but then he nearly always throws in something that is surprising and useful. The video is available here: http://blogs.conchango.com/michelleflynn/archive/2008/08/18/silverlight-user-group-2.aspx  Cheers Ian Technorati Tags: Silverlight

Deep Zoom - Restricting the Zoom Level

If you have used the Deep Zoom Composer to generate a Silverlight project, then one thing you may notice is that your users can zoom out so far that they can't see anything!  It is actually quite easy to lose the image completely and not be able to get back to seeing anything.  Alternatively you may want to restrict how far they can zoom in too, so they don't start to see "blocky" images. A simple fix for this is to modify the Zoom method in Page.Xaml.cs with the following:   public void Zoom(double zoom, Point pointToZoom) ...

Silverlight Managed Wrapper for Virtual Earth

I have been doing a lot of work with this wrapper (called VIEWS, and available here: http://codeplex.com/views) - it really makes life a lot easier for working with VE in Silverlight, and will no doubt point the way towards how the final Silverlight VE control will work. I recommend checking it out, and watching this intro video from Jared Bienz is a good start Virtual Earth Mapping in Silverlight with VIEWS   Cheers Ian Technorati Tags: Silverlight,Virtual Earth

Silverlight Wcf: The remote server returned an unexpected response: (404) Not Found.

EDIT:  See http://www.bbits.co.uk/blog/archive/2008/09/12/debugging-wcf-services-in-silverlight-2.aspx for further help on this.  Keep getting this error on a Silverlight 2 B2 project that is referencing a WCF service in a Web Site (not web project). There doesn't seem to be any reason for it, and it happens intermittently, however the workaround I have for it currently is to simple open up the cs class for the service and make any edit (e.g. just add a comment line) and then build.  This seems to fix it for a while. Hope there is a better solution long term, or a fix for this somewhere... Ian   Technorati Tags: Wcf,Silverlight

The Amazing Album Cover Atlas

http://theamazingalbumcoveratlas.org/ The excellent Word Magazine recently created an album cover atlas which shows locations of famous album covers.  Cool idea, but I didn't like the basic google maps interface.  So as an exercise and to also help spike out some work we are doing on www.lovecleanstreets.org I created a quick Virtual Earth and Silverlight version that make use of the VIEWS VE managed wrapper for Silverlight. Luckily the original developer, Ian Reeves used a REST service to get the data, so I was able to work with the same live data for my project.  There was no...

Bridging Web Service Calls in Silverlight

For security reasons, the Silverlight version 2 runtime restricts access to certain classes of URLs from the WebClient and HTTP classes in the System.Net namespace.  The main requirement is that the services you want to use should implement either crossdomain.xml (which is the Flash policy file) or clientaccesspolicy.xml (which is the Silverlight one).  If the service you want to use does not implement one of these then you can't use Silverlight to access it. However such restrictions are not present when using WebClient on the server, so you can easily create a bridge service that your Silverlight client can use....

WCF: "a non-empty contract name must be specified"

This error had me baffled today, and I could find little reference to it from Google or Live Search. It was the result of creating a simple WCF Service with two methods as follows and then trying to add a reference to it from Silverlight 2: [ServiceContract] public interface IWcfService { [OperationContract] string HelloWorld(string name); [OperationContract] List<Person> GetPeople(); }   public class WcfService : IWcfService { public string HelloWorld(string name) { return "Hello World " + name; } ...

Windows Mobile - where is it heading?

Todd helpfully re-published the Windows Mobile Silverlight roadmap recently.  It does not make exciting reading.  In amongst news of Impressive Google Android Apps, (and here) a T-Mobile Android phone this year (from HTC) and endless twitter about iPhone and 3G, the road map is hardly going to light any fires.  Here's my take on the Windows Mobile roadmap in general, followed by my hope of a glimmer of light for all us WM developers and users... Windows Mobile 6.1 was just released - really nothing to write home about - threaded SMS is nice but there is not much...

Virtual Earth 3d in the UK

I have noticed that more and more places in the UK are getting the 3D treatment in Virtual Earth, but there doesn't seem to be a list of all of them (at least I couldn't find one).  The UK models do not yet support the recent enhancements that some of the US cities have (such as Denver or Las Vegas) where vegetation is modelled as well as the buildings, but I expect that it is just a matter of time. So anyway I have created a collection of places in the UK where I have spotted 3D models - bear in...

Silverlight ObservableCollections from WCF and Linq to Sql

I have a ListBox in a Silverlight 2.0 app that is bound to some data coming from a WCF service that is returned from Linq to Sql.  The service is simplicity itself:   public List<CourseSection> GetCourseSections() { CoursesDataContext db = new CoursesDataContext(); return db.CourseSections.ToList(); }   Note: you have to mark your DataContext Serialization Mode as Unidirectional for the above to work (as shown)   I added a Service Reference to this from Silverlight and bound the data to a ListBox: private void Button_Click(object sender, RoutedEventArgs e) { CoursesService.CourseServiceClient client = new CourseBuilder.CoursesService.CourseServiceClient(); client.GetCourseSectionsCompleted +=          ...

Silverlight 1.0 Image Rotator with Ajax

Silverlight 2.0 might be all the fashion but 1.0 is released and out there, so there is value in using it purely for the wider reach and acceptance of users who are happier to  install the released plugin. So here is a easy little app you can write your self to give you an image rotator with click through and whatever logic you want for the weighting of the images. It fits together as follows: A Silverlight Xaml page with some JavaScript to control it An Asp.Net web page with the Script manager from the...

Learning Linq with LINQPad

If you are getting into LINQ - then this free, copy and run app, is a great way to play with it. It's a companion to C# 3.0 in a Nutshell but it is valuable without the book, and comes with 200 samples! Recommended!   Cheers   Ian Technorati Tags: Linq,LinqPad,C#,Nutshell

Automatically Scaling Content in Full Screen Mode in Silverlight 2

Technorati Tags: silverlight,silverlight 2.0 Silverlight has great full-screen support, and it is a simple matter to switch to full screen by setting the IsFullScreen property of the content object as follows.  Note for security reasons this can only be done in response to user input; note also that this code has changed from version 1.1 alpha   //get the plugin content object System.Windows.Interop.Content content = Application.Current.Host.Content; public Page() { InitializeComponent(); // wire up key down and full screen changed events this.KeyDown += new KeyEventHandler(Page_KeyDown); content.FullScreenChanged += new EventHandler(Content_FullScreenChanged); } void Page_KeyDown(object...

«March»
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910