Q:

WPF mvvm send TreeViewItem`s binded element via command

Good daytime.
I've got a problem with creating ContextMenu of TreeView. The problem is very simple. I want to add new items to treeview clicking RMB on treeviewitem and selecting a context menu command.
I know that I need to pass to my command a parameter that contains parent item. BUT. I need that I can RMB click on any treeviewitem, not only selected.
And heres the question:
How to pass the binded data of treeviewitem to my command.  
Here is class diag

Here is Xaml (EDIT)
        <TreeView.ItemTemplate>
            <HierarchicalDataTemplate ItemsSource="{Binding Item.Children}">
                <TextBlock Text="{Binding Item.Code}" HorizontalAlignment="Stretch">
                    <TextBlock.ContextMenu>
                        <ContextMenu Name="MyContextMenu" DataContext="{Binding PlacementTarget,RelativeSource={RelativeSource Self}}">
                            <MenuItem Header="{Binding DataContext.ToString()}" Command="{Binding DataContext.Item.AddNewItemCommand}" CommandParameter="{Binding}"/>
                        </ContextMenu>                            
                    </TextBlock.ContextMenu>
                </TextBlock>
            </HierarchicalDataTemplate>
        </TreeView.ItemTemplate>

But it does not even call my command.
    private void AddNewItem(object toItem)
    {
        if (toItem == null)
            return;
        ItemViewModel item = toItem as ItemViewModel;
        ItemMaterialModel itemMaterial = new ItemMaterialModel(ItemModel.CreateNewItem());

        ItemMaterialViewModel itemMaterialViewModel = new ItemMaterialViewModel(itemMaterial);
        item.Children.Add(itemMaterialViewModel);
    }

Maybe my command in wrong ViewModel?
Regards, Dmitry.

A:

Thanks to ethicallogics and his info about PlacementProperty, I've modified my Xaml like here:
        <TreeView.ItemTemplate>
            <HierarchicalDataTemplate ItemsSource="{Binding Item.Children}">
                <TextBlock Text="{Binding Item.Code}" HorizontalAlignment="Stretch">
                    <TextBlock.ContextMenu>
                        <ContextMenu DataContext="{Binding PlacementTarget.DataContext,RelativeSource={RelativeSource Mode=Self}}">
                            <MenuItem 
                                Header="{Binding Item.Code}"
                                Command="{Binding Item.AddNewItemCommand}" 
                                      CommandParameter="{Binding Item}"/>
                        </ContextMenu>                            
                    </TextBlock.ContextMenu>
                </TextBlock>
            </HierarchicalDataTemplate>
        </TreeView.ItemTemplate>

And in my StructureManagerViewModel I made not simple MainItem, but a collection of MainItems used in itemssourse of tree.
Regards, Dmitry.
Hope this experience will help people.

