One thing that really annoys me about the Model View ViewModel (MVVM) pattern is that your ViewModel and its associated view may not be near each other in the Visual Studio’s solution hierarchy. In addition, the native contextual menus for “View Code” or “View Designer” (and their associated hotkeys) are virtually useless.
Luckily, we can rely on some common MVVM naming conventions and macros to help us quickly navigate between the related files.
By MVVM convention, I use NameViewModel and NameView (which translates to NameViewModel.cs, NameView.xaml.cs, and NameView.xaml in a Silverlight project). The following macro allows us to toggle between NameView.xaml or NameView.xaml.cs to the NameViewModel.cs.
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports EnvDTE90a
Imports EnvDTE100
Imports System.Diagnostics
Public Module MVVMNavigation
Sub ToggleViewModelAndView()
Dim fileName As String = DTE.ActiveDocument.Name
If (fileName.Contains("ViewModel.cs")) Then
fileName = fileName.Replace("ViewModel.cs", "View.xaml")
ElseIf (fileName.Contains("View.xaml")) Then
fileName = fileName.Replace("View.xaml", "ViewModel")
If (fileName.Contains(".cs") = False) Then
fileName = fileName + ".cs"
End If
End If
Dim item As EnvDTE.ProjectItem = DTE.Solution.FindProjectItem(fileName)
If item Is Nothing Then
Return
End If
item.Open()
item.Document.Activate()
End Sub
End Module
Finally, the last step is to assign a hotkey to give you keyboard access to the file at any time.
Sass (Syntactically Awesome Stylesheets) is the only way to write CSS. It makes it much easier to write, read, and manage.
I pledged not to wash my car for a month (picture coming in about a month).
Update: It has been a month and I successfully completed the challenge but my car isn’t that dirty (on the outside).
One of my favorite photos by Mitch. See his stuff at http://www.mitchmeyerphotography.com/. He was also featured in Lürzer’s Archive Special presenting the 200 Best Photographers 2010/2011 which you can buy here: http://www.amazon.com/Luerzers-Archive-Best-Photographers-worldwide/dp/B003DVT09A/ref=sr_1_3?ie=UTF8&s=books&qid=1278372097&sr=8-3
A while back, I created a couple of search extensions for Songbird (http://www.getsongbird.com/). They allow you to search hype machine (http://addons.songbirdnest.com/addon/1826) and elbows (http://addons.songbirdnest.com/addon/1827). Try them out. I find them helpful.

Switchlet allows you to quickly change your default browser. It runs from the menu bar for easy access. It works on Mac OS 10.6 and above.

On June 7, Apple announced Safari 5 with the ability for developers to create secure extensions through Apple’s Safari developer program. Soon after the announcement, many good extensions were released for the browser.
I quickly signed up for the program to see how it works. Without giving away too much, or boring any readers, I am impressed with the process. The iPhone developer program gave Apple a good paradigm for any future developer programs and Safari seems to have benefited from it.
However, when I began writing my first extensions, which needed an HTML 5 database store, I received the following exceptions:
Error: SECURITY_ERR: DOM Exception 18.
According to documentation, you should be able to create a database for your extensions but it appears that there is a bug (http://openradar.appspot.com/8111265) that is stopping my extension development.
Hopefully, it will be solved soon and Safari will have a rich garden of extensions available.
Design by Simon Fletcher. Powered by Tumblr.
© Copyright 2010