Blog Articles

  • Want to bind to a WPF ConverterParameter?

    The other day I was working on a WPF functionality that requires me to format a user input from a DatePickerTextBox. I needed to take the input, parse it into DateTime and format the output based on a display format specified by the user. I thought this should be straightforward. So I went ahead and implemented […]

    Read more →

  • WPF did you know series #3: the following code snippets are the same

    Snippet 1: [crayon-6766e6b6cc19f956704211/]   Snippet 2: [crayon-6766e6b6cc1a5397712248/]   Snippet 3: [crayon-6766e6b6cc1a7993232439/] Snippet 1 uses in-built converters to convert “special” type of string to a type of Color. It is special because “White” in this code is automatically converted to type of Color. Snippet 2, in the same vein, has converters that knows how to convert […]

    Read more →

  • WPF did you know series #2: margin and padding

    I’ve been reading WPF Unleashed by Adam Nathan. I will be posting my lesson’s learnt in the form of small code snippets and useful tips. One of the very many goes like this: When you specify a margin or padding in XAML, you are using an implicit converter called “System.Windows.ThicknessConverter” which takes two parameters in its constructor, […]

    Read more →

  • WPF did you now series #1: you can run XAML from Internet Explorer

    Dear reader, It’s being a while, I know.  Got married, changed jobs, moved cities, and a newly minted daddy to a beautiful daughter. Saying that, I started reading “WPF Unleashed by Adam Nathan” and I thought I would blog and share some of the things I learnt reading the book. So it goes, did you […]

    Read more →

  • Apps I Use

    Sometimes I get asked what apps I use on my phone and iPad. On my Google Nexus S, I mostly use: Chrome Beta: it looks quite sleek. Google has done a good job in laying the tabs browsing very well. You could even see the preview of the tabs when you click on the tabs […]

    Read more →

  • Do you get confused identifying which w3wp.exe to attach to in Visual Studio?

    Two options for you: Option 1 (from command prompt) – In IIS 6: run %windir%system32cscript iisapp.vbs – In IIS 7: %windir%system32inetsrvappcmd.exe list wp This should give you process id with the corresponding application pool you’re interested in. Option 2 Open Windows Task Manager Add PID and Command Line to the Processes tab Find the w3wp.exe processes Look for […]

    Read more →

  • Custom Type in C# Settings

    Today I was working on having custom type for settings in C# and I couldn’t see my type when I browsed for it in the Settings.settings visual designer in Visual Studio 2008. I was able to get round the problem following the steps below: 1. Open your Settings.settings visual designer in Visual Studio. 2. Click on […]

    Read more →

  • My take on Android 2.1

    Two weeks back, I went into my local phone store here in Vancouver to get myself a Huawei U8100 with Android 2.1. I previously owned Windows Mobile 6.5 for about two years. After this, a Samsung which unfortunately was stolen at my local swimming pool. This is my take on the Android mobile platform: Likes […]

    Read more →

  • Are you unable to load due to AppBase location issue in NUnit?

    Error I have been getting this error lately: System.ApplicationException: Unable to load ‘NUnitAssemblyName’ because it is not located under the AppBase—-> System.IO.FileNotFoundException: Could not load file or assembly ‘NUnitAssemblyName” or one of its dependencies. The system cannot find the file specified. Environment Windows 7 32-bit NUnit version 2.5.3.9345 Visual C# Express 2010 .Net Framework 4 […]

    Read more →

  • Attribute cannot be added after a sub-element node

    Background The other day, I was working on an XSLT that transforms XML into HTML page. By fluke or some other means I got this error I wasn’t prepared for: Error Attribute and namespace nodes cannot be added to the parent element after a text, comment, pi, or sub-element node has already been added. XSLT […]

    Read more →

Search the blog for more articles