Show properties on specifics nodes

Hi! I have to show several properties to different types of nodes in the bottom of application. Imagine that Node A should show a textbox property to configure an label and Node B needs to show a textbox to configure its color. I already check the examples and i find one that does almost what i need, the “link demo”. I need only to show/hide a certain groupbox if a specific node was selected and not every node ( as in
“link demo” ). Can you please tell me how to do that? Thanks for your support

Ah, very good – you found an example of showing different “forms” based on what kind of Part was selected.

I think you just have to make the visibility and enablement of your forms be even smarter based on the Diagram.SelectedNode.Data.
Look at what the SelectedPartsChanged event handler does in LinkDemo.xaml.cs.
It sets a lot of UI state, based on values of the Diagram.SelectedPart.Data.

Hi Walter. Sorry for the delay. I solved the problem using an IValueConverter that returns the visibility property for various stackPanel elements that contains each node properties:

<StackPanel Visibility="{Binding FallbackValue=Collapsed, Path=SelectedNode.Data, <span =“Apple-tab-span” style=“white-space:pre”> ElementName=myDiagram, Mode=OneWay,
<span =“Apple-tab-span” style=“white-space:pre”> Converter={StaticResource detectSelectedNode}, <span =“Apple-tab-span” style=“white-space:pre”> ConverterParameter=NodeID_78}"

Each StackPanel has a NodeID passed as ConverterParameter. This way the method DetectSelectedNode (showed below) decide if the current selected node must be showed or hided.

public class DetectSelectedNode : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
BaseNodeData nodeData = (BaseNodeData)value;
string nodeType = (string)parameter;

        if (nodeData.NodeType == nodeType)
            return "Visible";
        else
            return "Collapsed";
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        return null;
    }
}

Thanks for you support!