Using command binding

The HierarchyNavigator control allows command binding for selected items.