Profile Picture

Shapes Layout

Posted By Luis Mendes 14 Years Ago
Author
Message
Luis Mendes
Posted 14 Years Ago
View Quick Profile
Forum Member

Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 25, Visits: 1

Never mind, I found it. Thanks a bunch as always:

nDrawingView1.Document.SizeToContent(new NSizeF(Size), new NMargins(5) );

 



Luis Mendes
Posted 14 Years Ago
View Quick Profile
Forum Member

Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 25, Visits: 1

Thanks, can you give me a sample code on how to size the document to the size of the view? The document has no Size property. Thanks in advance.

 



Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi,

In that case we recommend you set the ScrollBars property of the view to none, subscribe to the Resize event of the view and resize the document to the size of the view in there.



Best Regards,
Nevron Support Team



Luis Mendes
Posted 14 Years Ago
View Quick Profile
Forum Member

Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 25, Visits: 1

Thanks. But it doesn't solve my problem. I want the white area (the view I guess) to cover the entire hosting control. I tried all the options from ViewLayout but cannot figure it out. Anyhelp?



Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi,

You can esily size the document and zoom it so that all of its content is visible. All you need are 2 lines of code:

 

document.SizeToContent();

view.ViewLayout = ViewLayout.Fit;

 



Best Regards,
Nevron Support Team



Luis Mendes
Posted 14 Years Ago
View Quick Profile
Forum Member

Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 25, Visits: 1
I am attaching a picture trying to better explain my problem.  Basically I have a diagram and the diagram shapes are completely off the screen. See the rectangles W and C, they are pointing to other rectangles are off of the drawing view. Is there a way to tell the diagram control to fit all shapes in the drawing view? I will add the option to zoom in/out afterwards, but I would like to start with all the shapes visiable.

Attachments
diagram.jpg (92 views, 35.00 KB)


Similar Topics


Reading This Topic