Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WPF VB.NET drawing
Hi everyone,
 
I have searched for an answer to this question for some time. After returning to some very good, somewhat related, Q&A here on Code Project, I thought I would finally post here and cross my fingers for a suitable answer.
 
I am recently returning to some amateur coding using VB+WPF after a 10 year hiatus and coming from Delphi/Pascal background.
 
I will use a very simplified example of what I am trying to implement. What I need is essentially a scrolling vertical graph. This needs to be a consistent page(not broken into pages like a word processor). Lets say the height of the screen would represent 60 min, but the document itself may scroll for days worth of data. This application would also have some whitespace to either side of this scaled graph that may have the user input text comments into a movable text box(each comment in a separate text box, that is separately aligned with a given time).There may be a few other graphical elements along this graph as well that user can click/add.
 
My problem here is that I am absolutely lost on where to start with this. I am thoroughly confused by how to properly draw this scrolling graph so that it is many many pages long. redrawing the data elements with each move up or down does not seem like the solution to me. I am absolutely stuck on this. I can implement all sorts of standard things that are static and limited to what I see on the screen. I recently did a nice cubic spline on a graphic module. But again, none of those lines leave the page. ANY help that is offered will be very much appreciated. I would love to see some simple code showing a long scrolling page with shapes/lines/text. At the moment, I am convinced it would be much easier to draw a scene in 3D than to try an get this understood.
 
Thanks in advance and I will be watching to answer any questions asked.
 
Mark
Posted 6-Oct-12 17:29pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This is not straignt forward. I am not sure what you really want, but if you want to page from one to the other I would suggest using a scroll bar with a pane and replacing the image in the window with the correct page. If you are willing to just scroll, I would put the pages into a grid, and put the grid in a scroll panel.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Thanks for the Reply, and apologies for my own delay.
 
I will give your suggestion a try and see what results. I can see this is not so straight forward.
 
For clarification, a web page is a better example. Smooth scrolling single document. but can significantly vary in length. ie if the top to bottom of a webpage may represent 60 min of time/data plotted, there may be many hours or even days of data one could scroll through.(this could also be left to right scolling. The direction doesnt seem to be the limitation here).
 
Perhaps I will be stuck with making it appear to scroll with a scroll panel, redrawing any elements/data I place on it. That seems simple for just a time/data curve, but I have no idea how to move another element like a text box.
 
I think I remember reading where xcode and/or QT had a viewport to a larger canvas. Though I have never worked in either environment to know, that seems, on the surface, like a solution.
 
Any other advice is more than welcome.
 
Perhaps I need to get more into the "guts" of the issue as opposed to thinking there is some component to solve the problem. Can anyone provide a brief explanation of HOW a webpage buffers/draws the page as it scrolls? Or hell, how about just notepad.
 
My head hurts.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 274
1 Shweta N Mishra 216
2 PIEBALDconsult 210
3 Sergey Alexandrovich Kryukov 185
4 BillWoodruff 174
0 OriginalGriff 7,620
1 Sergey Alexandrovich Kryukov 6,937
2 DamithSL 5,586
3 Manas Bhardwaj 4,946
4 Maciej Los 4,495


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 15 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100