Blog Archives

Video Tutorial – Asynchronous Programming in .NET 4.5 (Task, async and await) – C# 5.0


This is a great introduction video for Async Programming in .net 4.5 making multi threaded application super easy and bug free. In below tutorial You will learn following concepts Using Task Using Async and Await Keywords in .net 4.5

Tagged with: , ,
Posted in .net, C#,

XAML Tips: Coding difference between Windows Phone vs Windows Store Apps


Here is great presentation which can give you clear idea about differences in Windows Store Apps vs Windows Phone. Top 10 Differences between developing Windows Phone and Store apps from Morten Nielsen

Tagged with: , ,
Posted in SilverLight, Windows Phone, XAML

XAML Tips: Why do I get error – Error The name ‘InitializeComponent’ does not exist in the current context


I am going to list few most annoying Errors XAML designer throws to me and hope you find right solution. Most likely by this time you have already gone though your error list many times and scratching your head.. why

Tagged with: ,
Posted in SilverLight, Tips, Visual Studio, Windows Phone, WPF, XAML

Windows Phone: MediaElement not playing file and failing with Error code 3123

Recently I had very frustrating error and I thought I must blog it to save someone else time. I used MediaElement in Windows Phone to play audio files (*.mp3 in my case). Suddenly one of my change broke it and

Tagged with: ,
Posted in Tips, Windows Phone, XAML

XAML Tips: How to generate Sample Data from ViewModel Class


I recently tried to create sample data by hand for XAML Designer. If you don’t know what is sample data used for then read this article Its really pain to type all properties of ViewModel class specially if you have

Tagged with:
Posted in Tips, XAML

XAML Error: The name ‘InitializeComponent’ does not exist in the current context


XAML designer is full of surprise so get ready for Binging … When you get below error then just remove Default constructor¬†with InitializeComponent() call and everything will be fine. When I had UserControl on my main Windows Phone Project I

Tagged with:
Posted in C#, XAML

XAML Error: Unexpected NONE in parse rule ElementBody ::= ATTRIBUTE


Recently I encountered odd error and I had no clue what this error means. After doing some BINGing I found that its related to empty elements. Unexpected NONE in parse rule ElementBody ::= ATTRIBUTE* ( PropertyElement | Content )* .

Tagged with:
Posted in XAML

Windows Phone XAP missing dll and Emulator Error ‘System.IO.FileNotFoundException’

I recently had very strange issue and I felt almost lost. With windows phone project I was keep getting ‘System.IO.FileNotFoundException’ at some point after application is launched in Emulator (or Device). However My Build was successful. What I noticed that

Tagged with:
Posted in .net, Windows Phone, XAML

Windows Phone 8 USB detect issue – not showing up in My Computer

ScreenHunter_02 Nov. 03 15.55

Windows Phone 8 comes with feature called USB Mass Storage Support. Which means when you plug your phone to USB Port it will start showing up in Drive List/Device list and you can copy/move files just like regular USB drive.

Posted in Tips, Windows Phone

How to randomize sort order in dictionary using Linq


I just came across need where I wanted to shuffle my dictionary with random order. Here is code snippet which uses Linq to randomize order of key/value pair you added. using System; using System.Linq; namespace MyApp { public class MyClass

Tagged with: ,
Posted in .net, C#, Linq