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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:34:07+00:00 2026-06-04T07:34:07+00:00

I have a custom class that extends the in built WPF Canvas called VisualCanvas

  • 0

I have a custom class that extends the in built WPF Canvas called VisualCanvas and it’s the main content area for the application grpahics. I have another custom class extending Canvas called SharedTransformCanvas and it will be used for adornments on top of the main content. The SharedTransformCanvas does not have a background colour set so mouse event etc are generally handled by the VisualCanvas. Both canvases have Transform dependency properties and are bound to a view model exposing another object’s transform i.e. the canvases are sharing a transform. Both canvases are within a grid of one row which is within a ScrollViewer.

The user can scroll the mouse wheel in the main canvas in order to zoom. This affects the transform shared between the two as I want the adornments to zoom in the same way as the main content and this generally works i.e. the adornments have a synchronised zoom.

The problem is when the user zooms in then scroll bars should appear and they were not so I overrided MeasureOverride on VisualCanvas in order to take the scale transform into account and report a larger size and make scroll bars appear. This solves the problem of the scrollbars appearing when the user zooms in but at the point the user zooms in enough for the scroll bars to appear the content of top SharedTransformCanvas seems to suddenly ignore the transform and jump back to it’s size with no transform applied. I have also tried to override MeasureOverride in SharedTransromCanvas to take into account the transform in the same way and report a bigger size but this does not fix the problem.

If I remove the scroll viewer the synchronised zoom seems to work fine but once you zoom too far you miss some content off the screen and have no way to scroll.

I don’t understand how the scroll viewer is interacting with the top canvases perception of it’s transformation? Can anyone explain this behaviour?

  • 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-04T07:34:08+00:00Added an answer on June 4, 2026 at 7:34 am

    I ran across this WPF Scale Transform and ScrollViewer – When Zoomed can't scroll beyond original size which highlighted I should proabably be using Layout Transform. I changed it to use a Layout transform and it works. I still don’t get why it suddenly ignores the transormation in my above scenario but this fixes my problem.

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

Sidebar

Related Questions

I have a custom class called NoteView that extends FrameLayout . Previously, I had
I have a custom button class called ImageButton that extends JButton. In it i
I have a custom-made view that extends the View class. I would like 2
I have a custom class loader so that a desktop application can dynamically start
I have a custom class that extends Preference that I'm using in conjunction with
I have custom class that extends WebViewPage that I use as the base for
I have a custom class that extends List which I am using as a
I am doing a custom CMS and I have built my base content class
I have a custom class that extends NSString . I'm attempting to serialize it
Hi I have a custom class that extends Sprite, that controls positioning on the

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.