View, Document Size

I need help to know how to implement any part.

  • View

I made a one class using GoView

It is viewed as only set document size on Control and the region of rest is shown background (gray Color, non grid).
When I Zoom in or out, The Scroll bars or The Background area Will be Shown.(like PowerPoint slide)

Whenever I reset the document size, size of the view also be changed to.

I want to implemente in view of the opration itself, without adding layers or rectalgle.

class MyView : GoView

void Init()
	this.Document.FixedSize = true;
	this.Document.Size = new SizeF(1000, 1000);
	this.DocPosition = new PointF(0, 0);
	this.DocScale = 1.0f;



  • OverView
    Overview is viewed as only set document size while maintaining a ratio.
    When I change the zoom of view using mouse wheel, Overview Rectagle’s size is changed.
    In the same way, When I Change the OverView’s zoom, Main View’s zoom Should be changed together.

  • GoObject
    When moving the Object using mouse move out of documnet size, it is removed in document area automatically.
    For example, dodumenet size is (1000, 1000), and rectagle’ size is (100, 100)
    When I move the object at (950, 950 (topLeft)), it moved at (900, 900)
    or Likewise, the TopLeft point of object is moved negative coordiation area

please, would you give me some example codes and advices.

thank you.

View: The simplest thing to do is just create a GoRectangle and add it to the view.BackgroundLayer.


Nothing you do is going to be any faster than that… can you explain more why you have that requirement?

Overview: GoView has a PropertyChanged Event for “DocScale”. You could catch that event and keep the two in sync.

GoObject: Look at what NodeLinkDemo does in the LimitedNode class in override PointF ComputeMove.