Skip to main content

Posts

Showing posts with the label Silverlight

Caliburn Micro: configuring the Window dialog

Caliburn Micro offers you the WindowManager to display a dialog. You only have to specify the viewmodel and Caliburn will do the rest, it finds the corresponding usercontrol, embeds this usercontrol into a window, binds view and viewmodel together and shows the result to the user. var loginViewModel = new LoginViewModel();  WindowManager windowManager = new WindowManager(); SettingsViewModel vm=new SettingsViewModel(); windowManager.ShowDialog(vm); But what if you want to change the behavior or the look of this window? As Caliburn.Micro creates this window for you, you don’t have direct control over it. Therefore the WindowManager.ShowDialog method has an extra overload which allows you to specify a settings object (as a Dictionary<string,object>). How can we use this? An example… dynamic settings = new ExpandoObject(); settings.WindowStyle = WindowStyle.ToolWindow; settings.ShowInTaskbar = true; settings.Title = "This is a custom title"; ...

Silverlight vs HTML 5

The last few months, a discussion is going on about what’s the best technology for the future, Silverlight or HTML5. This discussion was further encouraged by the recent announcements about Windows 8 focussing on HTML 5 and Javascript. I don’t want to start the discussion again but if you have to make a decision today, this is a post that can help you compare both technologies: http://blogs.msdn.com/b/eternalcoding/archive/2011/06/13/html-5-vs-silverlight-5.aspx

Could not load file or assembly ‘XamlServices’

Last week I did some test with the new Silverlight 5 functionality. Afterwards I reverted the solution back to Silverlight 4. But from that moment on, compilation started to fail with the following error messages: The strange thing was that all the necessary references were available. After trying a lot of things, I was able to solve the problem in the end by removing my userfile (*.suo) from the solution directory. Visual Studio recreated the file the next time I opened the solution and everything was working again.

WP7: Application Deployment Error - This operation returned because the timeout period expired

When trying to deploy a WP7 app  inside Visual Studio to the device, it suddenly started to fail with the following error: “Error - This operation returned because the timeout period expired.” Same problem when using the deployment tool. Restarting my phone, restarting my pc,… nothing worked. So I started to think what was different then before. I realized that my Wi-Fi connection was enabled on the Phone. Could that be the problem? So I disabled Wi-Fi again, tried to deploy and indeed this time it worked!

WP7: An error occurred while accessing IsolatedStorage.

While debugging my Windows Phone 7 app in the emulator, each time the application was tombstoned or closed, the following exception was raised: An error occurred while accessing IsolatedStorage. at System.IO.IsolatedStorage.IsolatedStorageSecurityState.EnsureState() at System.IO.IsolatedStorage.IsolatedStorageFile.get_AvailableFreeSpace() at System.IO.IsolatedStorage.IsolatedStorageSettings.Save() at System.IO.IsolatedStorage.IsolatedStorageSettings.TrySave() at System.IO.IsolatedStorage.IsolatedStorageSettings.SaveAllSettings() at MS.Internal.FrameworkCallbacks.ShutdownAllPeers() The error is clear, there is a problem with accessing the IsolatedStorage. But why? If I didn’t debug the application or when I deployed to a real phone, I never noticed the issue. So I hope it’s related to a bug in the emulator. .. Anyone out there who is having the same problem?

Visual Studio 2010 Training Kit March 2011 update

With the large amount of updates and new tools that Microsoft keeps throwing at us, you sometimes miss one. One recent updated that I just noticed, was an update of the Visual Studio 2010 Training Kit. You can download the Training Kit by going here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=752CB725-969B-4732-A383-ED5740F02E93&displaylang=en Or if you want to view it online, you can go here: http://msdn.microsoft.com/en-us/VS2010TrainingCourse All content has been tested to work with Visual Studio 2010 SP1. The setup scripts for all hands-on labs and demo scripts have also been updated so that the content can easily be used on a machine running Windows 7 SP1. And finally a list of the new content: Silverlight 4 Hands-on Lab - Migrating a Windows Forms Application to Silverlight Hands-on Lab - Migrating an ASP.NET Web Forms Application to Silverlight Hands-on Lab - Working with Panels, XAML and Controls Hands-on Lab - Silverlight D...

WP7 Tips

Building WP7 apps is fun and challenging. Every tip that can help improving the application experience is welcome! Jeff Wilcox, the creator of the 4th & Major app , published a checklist with some great tips focussing on the Windows Phone user interface.

Free WP7 ebook

Everyone likes things for free.  So here is a free ebook “ Silverlight for Windows Phone ” written by Puja Pramudya from Microsoft Innovation Center, Indonesia. This e-book is written for those who want to get to know, use, and develop applications for Windows Phone, Microsoft’s latest mobile platform. The download link and more information here . I didn’t had time yet to read it myself, but it’s on my list…

Enterprise Library 5 Validation Application block now supports Silverlight

While browsing around, I noticed a new code drop on the EntLib codeplex site containing the Enterprise Library 5.0 Silverlight Integration Pack . Most important features are: port of the Validation Application Block new pieces of the infrastructure to support XAML-based configuration async configuration loading Note there is also a conversion tool to facilitate the reuse of your Enterprise Library existing configurations and convert them to XAML. It can be plugged in the config tool via a wizard or you may integrate it in your build process. The conversion tool is still rough and we are iterating on it. Both a demo and  a short screencast are available to get you started.  

Cross domain handling on Azure blob storage

This week a customer wanted to access the Azure blob storage from their Silverlight and Flash client applications. However due to the cross-domain restrictions of both technologies, we couldn’t access the blob storage out-of-the-box. Let’s see how we can solve this and enable full access to blob storage through Silverlight and Flash. ClientAccessPolicy.xml When a Silverlight application makes a cross-domain call (other than those that are allowed by default ), it first fetches a file called ClientAccessPolicy.xml from the root of the target server. For the blob storage this will be something like http://{namespace}.blob.core.windows.net/ . Every blob in Windows Azure storage lives within a container, but there’s a special root container which lets us store blobs directly off the root of the domain. This is where we’ll put our ClientAccessPolicy.xml file. The following code creates a publicly readable root container and creates a blob named ClientAccessPolicy.xml within it: private v...

VISUG Session: Caliburn.Micro–Solving real world problems with MVVM–Sample application

This Tuesday I gave a presentation about Caliburn.Micro for the Visual Studio user group in Belgium( www.visug.be ). I already uploaded the presentation , but now I also added the sample application I’ve used. Download it here . Some interesting parts of the application: The default IoC functionality inside the bootstrapper is replaced by MEF. Check the MefBootstrapper.cs file in the Core folder. Some interesting IResult implementations are also available: BusyResult: Shows/hides a loading indication. ShowScreenResult<T>: Activates a specific screen on the Conductor. QueryResult: Executes a query on the backend and returns the results. CommandResult: Executes a command on the backend. A lightweight CQRS(Command-Query separation) implementation. Check the Model folder. A simple Conductor<T> implementation Convention over configuration And of course all the reasons why Caliburn.Micro is such a great framework: No Code Behind No Event Wireups No Commands No Dat...

Caliburn.Micro at VISUG

On Tuesday, February 08, 2011 I’m doing a session about Caliburn.Micro for the Visual Studio User group in Belgium. You've heard a lot about Model-View-ViewModel (MVVM), but you've struggled to see how it can help you in your day-to-day work. Or, you're experienced at implementing MVVM, but looking for some ways to maximize your investment in this methodology. In this session, we explore Caliburn.Micro( http://caliburnmicro.codeplex.com/ ), a simple MVVM framework, by iteratively identifying pain points in our UI development and eliminating them with simple solutions. You'll walk away with code, but more importantly with an understanding of how to apply some simple ideas to improve productivity with MVVM in your own projects. Be there!

Icons for your Windows Phone 7 app

Looking for some nice icons to use inside your Windows Phone 7 application? First have a look  at the Windows Phone 7 icon pack. This package contains a set of 64 app bar icons that you can use when developing applications for Windows Phone. In addition to the 64 icons in PNG format (32 dark and 32 light), this package also contains vector versions that can be easily imported into Microsoft Expression Blend. UPDATE: The Icon Pack is now part of Expressions Blend for Windows Phone. When you are working with the application bar and add items you can change the icon used using a drop down in Expressions Blend for Windows Phone. When you select an icon it is automatically added to your project. If you want to get to the icons to work with them yourself you can find them on your drive in C:\Program Files\Microsoft SDKs\Windows phone\v7.0\Icons. . Another option is this package created by  Bil Simber .  It contains 502 Metro style icons in PNG, XA...

Technology discussions today and tomorrow

For as long as I can remember, developers(but also all other kind of IT people) have religious descussions about ‘there’ technology; Java vs .NET, stored procedures vs dynamic SQL, client side vs server side and so on.. And just when you think people start agreeing the next discussion knocks on your front door. One interesting discussion I followed closely last year(it already seems so long ago) was ASP.NET WebForms vs MVC . I especially liked the post by Scott Guthrie showing some common sense on the debate. I totally agree with Scott’s point about the nature of technical debates, and the acceptance that some technologies suit better for some problems. However with the emergence of new web technologies like CSS 3 and HTML 5, the growth of REST and the renewed interest in Javascript, I want to re-open the discussion. I think that architecting ASP.NET MVC applications will have a lot more potential than WebForms. Just think for a second what you have to do to transform your curren...

Silverlight 5: Microsoft’s answer on the Silverlight is dead discussion

The last few weeks, there was a lot of buzz around the future of Silverlight. Although there were some official comments , the rumors kept going. For the remaining skeptics,  what can be a better answer than the announcement of Silverlight 5. A t the Silverlight FireStarter event Microsoft announced the timeline for Silverlight 5 in 2011.  Silverlight 5 was the main subject of  Scott Guthrie’s keynote where Microsoft demoed many of the coming new features and capabilities.  Silverlight 5 will be in beta the first half of 2011 and ship early in the second half of 2011. Some of the impressive improvements(note especially XAML debugging): Silverlight 5 Media improvements: Hardware Decode & Presentation of H.264 performance improvements using GPU support Trickplay with fast-forward and rewind support w/normal audio pitch Improved power awareness Remote-control support Digital Rights Management advancements Application Development impro...