I have a diagram that starts with a Model height and width of 1056 and 816 respectively. This appears to be equivalent to one 8.5x11 sheet of paper. Is it correct that these are related?
I would like to have my model automatically grow. Is that possible? If not, what event would indicate that symbols are being drawn beyond the current model width and height?
ADAdministrator Syncfusion Team July 2, 2004 07:24 AM
The following lines in the constructor of the Model that sets it''s size
float width = Measurements.Convert(GraphicsUnit.Inch, GraphicsUnit.Pixel, 96.0f, 8.5f);
float height = Measurements.Convert(GraphicsUnit.Inch, GraphicsUnit.Pixel, 96.0f, 11f);
So you can easily convert real world measurements to logical units and use the result to set the size of the model.
The size of the model can be set through the Model.Bounds property and the Model.GetConstrainingRegion method
can be used to detect when a node goes beyond the bounds of the model
It can be overridden in a derived Model class. The idea behind this method is that the model can specify the bounding
region for any given node and by default, the bounding region for all nodes is the bounds of the model.But you can override
this behavior and define the bounding region on a node by node basis.
So in your case, you could check the bounds of the node and compare it to the bounds of the model and readjust
the model appropriately if the node falls outside the bounds of the model.
CFChuck FieldsJuly 4, 2004 01:32 PM
Thanks for your reply.
The GetConstrainingRegion method doesn''t seem to be called automatically. I was able to override it and work with the Model.Bounds after I added an explicit call from my Symbol. Should that call be necessary?
I have went ahead and placed this logic elsewhere now so that I can recalculate the bounds on demand. Which is just what I need!
The next problem I seem to have is that the Model.PageSettings.PaperSize seems slow to access. I assume it is looking for Windows default printer settings. Is that correct? Is there a way to initialize this so that subsequent accesses will be faster? Perhaps I should cache the papersize values on load and then update them when the pageSettings change.
ADAdministrator Syncfusion Team July 9, 2004 11:25 AM
Thanks for the update and good to hear that you have this working. With reference to PageSettings question, yes it is the case and it is how all .NET Applications will behave, i.e look for the default settings. I hope you have already taken a look at the reponse to your other posting on this issue (with reference to Model.PageSettings.PaperSize values).
TLTruman LackeyJune 13, 2006 05:27 PM
Having issues with acessing pagesettings being slow. Can''t find the post on how I might be able to speed this up.
ADAdministrator Syncfusion Team July 4, 2006 08:35 AM
I apologies for this delay in responding. And as for the issue that you have mentioned here, could you please post us some more informations/reproducing steps with any one of the diagram samples? So that it will be easier for us to have a closer look into the problem.
Thank you for your support to Syncfusion products.
TLTruman LackeyJuly 5, 2006 08:26 PM
What I do is check to see if a symbol is added or moved in a diagram outside of the current model boundaries and if it is I change the boundaries to include the newly added or moved symbol. In one of my methods during this process I am accessing View.PageSettings.PaperSize and this call is slowing down the move redraw for the symbol in the diagram. I did not have this problem with vers 2 of Syncfusion with .net 1 or .net beta 2.
ADAdministrator Syncfusion Team July 6, 2006 06:59 AM
As per your previous update, if you are looking for a post regarding the slow process in accessing the Page Settings, then kindly refer the following link that will help you to have an idea regarding this issue.
Please let us know if you need any further assistance on this issue.
Thank you for your patience.
TLTruman LackeyJuly 6, 2006 11:38 AM
The link provided explains custom page sizes, how does this apply to slow access to pagesettings? Is this the correct link? Am I to assume that this is a .net issue? If so .net 2.0 has somehow slowed down access to the printer pagesettings.