SelectedNode with MVVM

Hi All,

I am using MVVM pattern with GoXam diagram. The problem I am facing is the SelectedNode property in my view model get populated with “Node:MyNodeType” where I try to cast it as following

SelectedNode as MyNodeType

It always return null. Is there any way to get strongly typed object in the SelectedNode property in the view model.


Try SelectedNode.Data as MyNodeType.


Thanks so much. This work perfectly.

Here is my property

private Northwoods.GoXam.Part _selectedNode;

    public Northwoods.GoXam.Part SelectedNode
        get { return _selectedNode; }
            _selectedNode = value;

            // this work successfully. <span style="line-height: 1.4;">CalculationComponentDetailViewModel</span><span style="line-height: 1.4;">  is my node type</span>
            CalculationComponentDetailViewModel tempNode = value.Data as CalculationComponentDetailViewModel;