This project is read-only.

ContextMenu on background?

Apr 28, 2011 at 5:28 PM
Edited Apr 28, 2011 at 6:56 PM

Hi,

         Is there any way to add ContextMenu on backgroud (GraphLayout)? I tried couple different approaches but none of them worked.

         Thanks very much for your help.

Apr 28, 2011 at 7:16 PM

Finally figured it out:

under zoom control, add the following code

<zoom:ZoomControl.ContextMenu>
                <ContextMenu>
                    <ContextMenu.Items>
                        <MenuItem Header="Search by Name" />
                        <MenuItem Header="New Node"/>
                    </ContextMenu.Items>
                </ContextMenu>
</zoom:ZoomControl.ContextMenu>

You can add click event you want.