Gah! Can't get page to resize to window

D

DanaLe

This should be an easy one, I think, I must be missing something really
obvious...

I've got the Visio Control embedded in my window application, and when the
user resizes the window, the control resizes as well. The thing is, I'd like
the page's behavior to be for the page to resize to fit the window. That is,
I'd like the page to zoom to fit the window.

code looks something like this:
// make the control the same size
axDrawingControl1.Width = this.Width - 10;
axDrawingControl1.Height = this.Height - 10;
// none of the below works
//axDrawingControl1.Document.ZoomBehavior =
Microsoft.Office.Interop.Visio.VisZoomBehavior.visZoomInPlaceContainer;
//axDrawingControl1.Document.ZoomBehavior =
Microsoft.Office.Interop.Visio.VisZoomBehavior.visZoomVisio;
//axDrawingControl1.Document.ZoomBehavior =
Microsoft.Office.Interop.Visio.VisZoomBehavior.visZoomVisioExact;
//axDrawingControl1.Document.Pages[1].ResizeToFitContents();

Thanks for any help and/or suggestions. I appreciate it!
 
D

DanaLe

Thanks for the suggestion, Dave. Unfortunately, I did try PageSizingBehavior
= ...visResizePages
but all it did in my application was shrink the actual page much smaller
than it was (even in the instance of resizing the window and control larger)
and leaving many of the shapes on the page floating in outer space.

It seems like it should have something to do with an automatic zoom. Hmmm...
anyone?

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top