Random Post: Mock Object Strategies
RSS .92| RSS 2.0| ATOM 0.3
  • Home
  • About
  • Eric’s Toolset
  • Free Software
  • Software License
  •  

    MessageBox: Just Say Nein

    June 14th, 2010

    The Windows MessageBox is really convenient to use. A single line of code gets you a dialog box with a caption, a message, an icon and a set of available buttons that cover a lot of possible input scenarios. Unfortunately, the text on the buttons is supplied by the system, so if you’re building an application that is intended to be localized, you invariably end up with something that looks like a bug.

    Read the rest of this entry »


    This solution contains a web site…

    May 6th, 2010

    I kept getting a message from Visual Studio 2008 when opening a solution saying:

    This solution contains a web site at ‘http://localhost/Services’. There is already a web site at this location on this computer. Do you wish to use this existing location for your web site (existing files will be overwritten)?

    It looks like the (one?) cause is a corrupt solution file.

    Read the rest of this entry »


    “It’s Just UI”

    January 30th, 2010

    Maybe I’ve just imagined this — created my own straw man to take down — but I’ve sometimes sensed some disparagement of user interface programming. “It’s just UI,” the architect will say. “It’s not like it’s a hard or interesting part of the system.” As I’ve done more and more UI development lately, I’ve had to consider if this is the direction I want my career to go.
    Read the rest of this entry »


    .NET Color Struct Equality

    December 16th, 2009

    When is white not white? When one is Color.White and the other is Color.FromArgb(0xff, 0xff, 0xff, 0xff).

    Read the rest of this entry »


    Transparent WinForms Label

    November 28th, 2009

    Easy control transparency isn’t exactly a hallmark of Windows Forms. If you have a form with a background image or a gradient, the stock controls paint with a solid background to give a criminally egregious aesthetic.

    Read the rest of this entry »


    Rounded Rectangluar Regions

    November 19th, 2009

    There are lots of examples that demonstrate how to draw a rectangle with rounded corners using GDI+ in .NET. Converting such a rectangle to a Region so that it can be filled or be used for the geometry of a window can have less than perfect results, though.
    Read the rest of this entry »


    Silverlight Localization

    July 8th, 2009

    The official Silverlight documentation about localization gives lots of information about working with resource files, but it is kind of scant on how to actually get localized strings to show up in the UI in a reasonable way. For example, an unreasonable way would be to set the text/content properties of all the controls in a page’s code-behind file. A reasonable way is to use data binding.

    Read the rest of this entry »


    Unit Testing Silverlight View Models

    June 8th, 2009

    Being relatively new to Silverlight development, I’ve not had the good sense to accept conventional wisdom that the Visual Studio unit test framework can’t be used to test Silverlight code. For testing view models at least, I’ve been successfully using Mstest and Rhino Mocks for a few months now.

    Read the rest of this entry »


    The Best of PDC 2008

    January 17th, 2009

    For those of us poor folk who didn’t make it to PDC this past fall, Microsoft has been taking the show to us in the form of its MSDN Unleashed series. Rob Bagby, developer evangelist, came to Salt Lake City to present and give updates about new and upcoming technologies for developers.

    Read the rest of this entry »


    UI Horror: Birthdays

    June 28th, 2008

    Last year I wrote about my dislike for cell phones. Despite that, I actually have one now. Maybe I’ll write more about that at some point, but I was just recently reminded (irony to be revealed later) of a particularly sloppy user experience associated with adding birthdays to contacts and I couldn’t help rant a little.

    Read the rest of this entry »