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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:13:32+00:00 2026-06-17T10:13:32+00:00

I am trying to write a WPF application to render shapefile on a canvas

  • 0

I am trying to write a WPF application to render shapefile on a canvas without using any GIS SDK. Up to rendering its successfully completed. While trying to apply Scale transformation, I found that all the shapes on the canvas gets bigger while zoom in. In case of point features (shown as ellipse shape on canvas) and TextBlocks, the size should remains same, only the position should change relatively. Please guide me how to achieve this requirement.

For point features my code is as below:

private Geometry CreateEllipseGeometry(double size, Point centerPoint)
    {
        EllipseGeometry geom = new EllipseGeometry();

        geom.RadiusX = size;
        geom.RadiusY = size;
        geom.Center = centerPoint;

        geom.Transform = this.viewTransform;

        return geom;
    }

Here viewTransform is a transform group which has two children, one is scaletransform and another one is translatetransform.

I have found an article on this site (Prevent WPF TextBlock from expanding text due to LayoutTransform) that describes how to prevent textblock from expanding. the solution says to bind the inverse transform to the textblock.
Here my textblocks are created dynamically. So please tell me how to dynamically bind the inverse transform to a textblock.

  • 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-17T10:13:33+00:00Added an answer on June 17, 2026 at 10:13 am

    I have done the exact job in WPF without using any API. in the case of point features you can set the Transform property of the point to the TranslateTransform (that is presumably contained in your viewTransform), so all point features move correctly as other features move when panning the map. but in the case of zooming I clear all the points and textblocks and recalculate their coordinates given the viewTransform.

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

Sidebar

Related Questions

I'm trying to write validation rules for my data objects in a WPF application
I have a WPF Application that I have been trying to write in the
I'm trying to write a WPF application which uses a function defined in C++.
I'm trying to write a WPF application for displaying images from a selection. I
I'm trying to write a WPF application that will update a set of text
So i'm new to WPF, and i'm trying to write an application that displays
I'm trying to implement validation in my WPF application using the IDataErrorInfo interface, and
I'm trying to write a simple WPF application in C#. Coming from a primarily
I'm trying to write an automated test harness using WPF and F#. I'd like
I am trying to use Project White to write automated tests for my WPF

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.