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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:38:16+00:00 2026-06-11T09:38:16+00:00

There is a graphics WPF editor that is designed to work with diagrams. Because

  • 0

There is a graphics WPF editor that is designed to work with diagrams. Because diagram can consist of very large number of objects, it was chosen to use Drawings for output. That means we create list of some business objects

class BusinessObject
{
   // bunch of other properties and methods
   public GeometryDrawing MyDrawing {get;set;}
}

pass it to helper that creates DrawingVisual for each drawing :

public List<Visual> BuildVisuals(List<BusinessObject> objectsList)
{
   // foreach item in objectsList takes item.MyDrawing and draws it with DrawingContext
}

and then inject received data into drawing host

public class VisualHost : FrameworkElement
{
   // FrameworkElement overrides, skipped

   public readonly VisualCollection _children;       

   public VisualHost(List<Visual> visualsList)
   {
     _children = new VisualCollection(this);
     foreach(var visual in visualsList)
     {
        _children.Add(visual);
     }
     // mouse handlers, other logic (skipped)
   }
}

Everything works fine and quickly (even VisualHitTesting with backward mapping to respective business object with two-way data changing on-the-fly), but now there is a need to allow visual editing of objects – moving them around workspace, change size, scale ratio, etc. WPF Thumbs and Adorners come into mind (http://www.codeproject.com/KB/WPF/WPFDiagramDesigner_Part1.aspx), but they are intended to work with UIElement/Controls, that our Visuals aren’t. Does anyone see a way to solve this problem without much changes of initial logic? Some workarounds or similiar functionality maybe. Rewriting the above mentioned code is not an option, we can’t have 1000+ Control objects in memory if we use them on diagram. Thanks in advance.

  • 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-06-11T09:38:17+00:00Added an answer on June 11, 2026 at 9:38 am

    Problem was solved manually – resizing and rotating adorners were drawn as separate objects over existing ones and added/removed from canvas on set/lost focus.

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

Sidebar

Related Questions

I have a WPF app that draws a compass. There is a large ring
In my graphics application, there is canvas area that has some graph. The scrollbars
I was wondering if there were any good free graphics libraries for C that
My WPF application has a feature whereby it renders a large number of images
Is there a vector graphics editing component inside flex, I mean component that allows
Is there any way to convert a android.graphics.Bitmap instance into jpeg in android?
Is there a good way to identify (or at least approximate) the graphics program
I'm wondering if there is a big difference when loading graphics made in pure
Once again I'm doing Java graphics (Graphics2D) but I noticed there is no Polygon.Double
Is there a ActionScript-version of JavaScript's Canvas.clearRect()? I only know graphics.drawRect(...) which allows me

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.