Blog Archives

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

WPF Animation on Projection Property using code or XAML


If you try to define DoubleAnimation on Projection property then you will see lot of challenge. Here is How to fix. First make sure you create Name Attribute on Projection property like below for whatever UI element you want animate.

Tagged with: , , ,
Posted in .net, C#, Linq, SilverLight, WPF, XAML

Create 3D Effect using Projection in WPF/SilverLight


If you ever noticed then every FrameworkElement in WPF has property called Projection This property is very powerful if you use it right way. You can give 3D effect of any UI including Images in WPF/Silverlight Here is sample code

Tagged with: ,
Posted in .net, C#, SilverLight, WPF, XAML

XAML Animation – How to Scale and Rotate Object (Multiple Transformations)


In this post I want to share snippet which shows simple technique to implement multiple transformations on same object. You will notice that in order to achieve this I have used TransformationGroup along with StoryBoard and DoubleAnimation private void Rotate_Click(object

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

Quick way to edit and preview XAML Snippets using Kaxaml

XAML Editor Pad

Sometimes you want to learn XAML tips/tricks without creating full page and don’t want to bother with Visual Studio at all then I use simple tool called kaxaml You can Download zip file from here … Or use XAMLPad another

Tagged with: ,
Posted in .net, Tips, XAML

Visual Studio Tips – How to set text edit as default view for XAML file

Default XAML Editor

How many times you felt that XAML designer was too slow for you to handle??? If you using code window most of the time for XAML Editing then you can change default edit action for XAML files as below so

Tagged with: ,
Posted in .net, Tips, Visual Studio, XAML