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 3969152
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:55:46+00:00 2026-05-20T03:55:46+00:00

My problem is as follows. I have a Canvas and I have a class

  • 0

My problem is as follows. I have a Canvas and I have a class called “Node”. I create a collection of Nodes, and for each Node I need to some shape (Ellipse, Triangle, Letter) on the canvas at some specific location.

When I click on a Node, I need to be able to go back to the parent Node object and change it.

Adding an MouseLeftButtonUp listener and then going to e.OriginalSource does not work because the original source is of type Ellipse (or some other Shape), not of type Node.

I see two solutions to this problem:

1) If there is some way to attach data to the Ellipse, such as a Node ID, that would be good (something like Ellipse.AddLogicalChild or Ellipse.SetCurrentValue, but I am not sure that would work or if it would be appropriate to use one of those methods).
2) Or, I need the Node to derive some Shape class so that I can add it to Canvas.Children directly.

How do I do either one of these? Or, if you see another solution, please let me know.

Thanks,

Anton Kanevsky

  • 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-20T03:55:47+00:00Added an answer on May 20, 2026 at 3:55 am

    Your node class could just be a usercontrol that hosts the desired shape as its content. ie: Create the desired shape in the constructor and set as the content, then add the node to the grid.

    Alternatively, you can just have the shape be a member of the node class(or not), and subscribe to the events with a node class function. ie: each shape would fire an event in its associated node class.

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

Sidebar

Related Questions

I have a graph problem as follows and I need to optimize its execution
I have a superclass called Canvas, from which I create several subclasses. I want
My problem is as follows: I have a simple navigation <ul class=navigation> <li class=heading
Newbie here! My problem is as follows: I have a dynamically populating ul where
I'm facing a problem that I can summarize as it follows: I have a
My problem is as follows. I have an array of objects in the form
I have a mysql problem, my query looks as follows but not complete SELECT
A minimal code that reproduces the problem is as follows: <div class=cell> <input type=text
Greetings, I have a problem as follows: I have an SQL variable declared: DECLARE
My problem is as follows: I have server.properties for different environments. The path to

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.