Posts Tagged ‘Windows 8’

Windows 8.1 OutOfMemoryException when rendering Bitmaps

February 8, 2014 Leave a comment

Recently, I have been faced to a strange issue in one of our application.
That application has been validated to work on bigger screen size, and we notice at that time that bitmaps graphics was badly render on such big screen mainly due to different pixel size.

To solve that bad rendering of such bitmap on such screen size, we had to use the BitmapScalingMode property of an Image control.

<Image RenderOptions.BitmapScalingMode=”HighQuality” Source=”/Resources/key.png” Width=”40″ Height=”40″ Stretch=”Fill” VerticalAlignment=”Center”/>

Has shown is sample code above, setting the property to HighQuality value was rendering the image nicely on bigger screen. So far so good then.

Next steps was to test the application on this same type of screen but under Windows 8, working perfectly well as well until the time it has been updated to Windows 8.1 and get our application crash with an OutOfMemoryException.

After days of testing we have identify that it was occurring when used image was about 8 bits and 256 colors. This has been reported as a bug by Microsoft on Windows 8.1 update.

Different possible Work around:

  1. With your prefer      graphic tool generate a files from your image with more depth
  2. If you have no      control of the image you have and want to still use it you card converted      from code by the following code snippets

    BitmapSource ResizeImage(BitmapSource image, int width, int height)
    var      bmp = new FormatConvertedBitmap(image, PixelFormats.Bgr24, null, 0);
    return      new TransformedBitmap(bmp, new      ScaleTransform((double)width/bmp.PixelWidth,      (double)height/bmp.PixelHeight));

Hope this will save you some times 🙂

Categories: Windows 8, WPF Tags:

MVVM pattern under Windows 8 – WinRT

May 20, 2013 Leave a comment

For those like me who like to get a flexible code and easy maintenable possibilities as well as flexibilities, since I discover and implement the MVVM pattern with WPF, I can say that I could not leave without it.
Before going to that pattern I have test different approach like Prism, MVVM ToolKit and other open source project. Based on my test result and personnal needs, my choice goes to MVVM tool Light toolkit. Why? simply because of its name ” Light” . Prism so far was a too heavy package based on what I was using.

What is cool is that the MVVM Light tool kit is nicely maintenain by Laurent Bugnion and get an update version for Windows 8 actually.

Those post below describe the MVVM pattern under Windows 8 and WinRT. Nice articles to step in and discover some interresting points covered:

Using the MVVM Pattern in Windows 8
Prism for Windows Runtime

Happy reading!

Get your Windows Store application certified quickly

November 20, 2012 Leave a comment

First the time I start to explore the windows store and all books and article around, gettings started section is the famous part where  all of us usually start from.

But then nothing much on good rules in order to get your app certified.

I discover a nice article on this topic. Please refer to the following blog post if you are still wondering:



Categories: Windows 8 Tags: ,

Microsoft Surface slate available for Pre Order

October 16, 2012 Leave a comment

Every geek or developper like me would like to keep informed of the latest developments with Surface.
That’s done, just got the info to my mail box today that  Surface is available for pre-order today
starting at 9am Pacific Time on Get your order in today!

Windows 8 revealed at Build

September 14, 2011 Leave a comment

That’s done, Windows 8 has been shown at Build conference. A completly new approach of what you have seen so far; A user experience which has been redesign in order to cover the way we are using computer and consuming data today. Those who are familar with windows phone 7 user experience will see in Windows 8 a complete standardization between those .A deep dive in services consuming in WinRT, the runtime of the new Windows 8. One big thing which has been introduced is the fact that Windows 8 applications will be abe to be build in the language of your choice ( C#, C++, Silverlight, WPF, HTML, CSS, javascript). The Metro Style is part of the Windows 8 SDK with new controls completly accessible through Blend 5.

A store for Windows 8 application ?
Yes, your read right, a store for Windows 8 application has been introduced. Hmmm are they following the Mac OS strategy by going through the certification process of apps ?

In fact you have the choice. from visual studion you will be able to publish your appliation on the Store, same as we do today for windows phone application. Bad or good, I do not know yet personnaly but would expect they will be not too much locking as Apple is doing today.

Anyhow real cool feature in windows 8:

  • Faster boot, less that 5 seconds
  • Rich user experience
  • fluidity of the information
  • fast application launching and switching
  • Multi programming language
  • Live connection to web service
  • better management of ressources
  • Support of Hyper-V

And much more to come….

Categories: Windows 8, WPF Tags: