Ooops, sorry I was looking at the removed codes. You're right, the hard-casting can cause exception. I would rather Tron does this:

````
PortViewModel pvm = grid.DataContext as PortViewModel;
if (pvm == null)
    continue;
````

This is safer as it is possible for the mouse to hover over a grid whose DataContext is something other than PortViewModel.