Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3433650
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:36:07+00:00 2026-05-18T07:36:07+00:00

I am working on a node-graph-view similar to Maya’s HyperGraph in which I can

  • 0

I am working on a node-graph-view similar to Maya’s HyperGraph in which I can connect Nodes with drag and drop. Because the target-node can have several Inputs, I want to create a temporary ContextMenu to select the input as suggesting in the following mock-up:

http://www.pixtur.org/images/uploaded/0000/0696/large.jpg

I tried for quite a time to trigger the creation or opening of a context-menu. It looks like the Win32 TrackPopupMenu does roughly, what I’m looking for. Is there an WPF / C# equivalent?

Thanks
pixtur

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:36:08+00:00Added an answer on May 18, 2026 at 7:36 am

    I use the following code to attach a contextmenu to a listview gricolumn header:

    <ListView ... MouseUp="ListView_MouseUp">
    

    In the codebehind i set the ContextMenu property of the list on the mouse up event, in order to show the context menu:

        private void ListView_MouseUp(object sender, MouseButtonEventArgs e)
        {
            DependencyObject depObj = e.OriginalSource as DependencyObject;
    
            while (depObj != null && (!(depObj is GridViewColumnHeader)))
            {
                depObj = VisualTreeHelper.GetParent(depObj);
            }            
    
            if (depObj is GridViewColumnHeader && e.ChangedButton == MouseButton.Left)
            {
                ((GridViewColumnHeader)depObj).ContextMenu = ContextMenu;
            }
        }
    

    The variable ContextMenu refers to a contextmenu instance that i created bfeorehand, you could also create the ContextMenu in the Mouse event handler.
    I’m not sure if this helps as I dont know how you do the drag/drop, but it is worth a try

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an interactive WPF graph/tree tool and have nodes and links
I'm currently working on some MPI code for a graph theory problem in which
I'm currently working on an interesting graph problem, I can't find any algorithms or
I'm still working on my zoomable node-graph project. I'm currently having problems with what
I'm working with Node.JS. Node's buffers support little-endian UCS-2, but not big-endian, which I
I'm working on the long-poll application which uses node.js as a server. The particular
The following is the data I am working on: __DATA__ Node 1: 98 debug
I am working on some code were I need to add a Node into
I'm working on a simple carousel. My problem appears when trying to insert node
Working with python interactively, it's sometimes necessary to display a result which is some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.