Now that Amazon is selling groceries, the reviewers have been having some fun. Check out the reviews
for Tuscan Whole Milk. Freakin hilarious.
I was working in Visual Studio 2005 the other day, and noticed something in a dialog box that I’ve seen a hundred (maybe a thousand) times before, and never noticed. It was in the “Add New Item” dialog:
Notice anything? I’ll give you hint:
See it? How about now:
After over a year of beta testing, thousands of bug reports, many person-years of development – I have to chuckle that something so simple slipped through. Totally minor, but it made me laugh.
In Visual Studio .NET 2003, ASPX pages included a property called pageLayout, which defaulted to “GridLayout” – essentially, CSS absolute positioning for all form elements. Although this is a horrible idea in a production application (I assume MS did it to make it easier to demo rapid application building), it does turn out to have a handy use – it makes it easy to quickly sketch out web forms for UI design or prototyping.
Visual Studio 2005 did away with the pageLayout property on web forms, but it did include a similar capability in the HTML Designer. The Tools/Options/HTML Designer settings page includes positioning options that allow you to create a very similar (though exactly the same) experience to pageLayout=”GridLayout”. To enable it, check the “Change positioning to the following for controls added using the Toolbox, paste, or drag and drop” option, and select “Absolutely positioned” in the combo box. This recreates most of the GridLayout experience, with one exception – new controls that are dropped onto the design surface always show up initially in the upper-left hand corner. They can then be dragged to any position on the form. In VS2003, controls appear exactly where they are dropped.
The option described above is a global setting, which can make it inconvenient to use. Fortunately, it’s not too hard to cruft up a macro that toggles the state of the CSS position option:
Dim autoPositioningProperty As [Property] = DTE.Properties("TextEditor", "HTML Specific").Item("AutoPositioning")
Dim autoPositioningModeProperty As [Property] = DTE.Properties("TextEditor", "HTML Specific").Item("AutoPositionMode")
If (autoPositioningProperty.Value = 0) Then
|autoPositioningProperty.Value = 1
autoPositioningModeProperty.Value = 0
ElseIf (autoPositioningProperty.Value = 1) Then
autoPositioningProperty.Value = 0
Hook the macro up to a toolbar button, and you can easily switch between the two modes. Unfortunately, it doesn’t seem that VS2005 macros that are assigned to toolbar buttons can be represented as toggle buttons, so the UI doesn’t give you a clear indication of what mode you’re in. Maybe some day I’ll think about wrapping this up into an addin.