AD
Administrator
Syncfusion Team
July 8, 2004 03:44 PM UTC
Hi Chuck,
I was able to reproduce the problem. The Diagram''s View component maintains an independent reference to the Model''s page size and this fails to get updated of the change in the PageSetting. This has been confirmed as a bug and a QA report has been logged. We will fix the problem in a future update of Essential Diagram.
For the time being, you can workaround the condition by using Reflection to update your Diagaram''s view with the new page size. The following code shows the implementation,
// The Model.PageSettings is set to a new paper size
this.diagramComponent.Model.PageSettings.PaperSize = new PaperSize("CustomSize", 300, 200);
Size newsize = new Size(300, 200);
// Use Reflection to update the View''s paper size setting
Type viewtype = typeof(Syncfusion.Windows.Forms.Diagram.View);
System.Reflection.FieldInfo finfo = viewtype.GetField("pageSize", BindingFlags.Instance|BindingFlags.NonPublic|BindingFlags.GetField);
finfo.SetValue(this.diagramComponent.View, newsize);
// Force the view to refresh itself
this.diagramComponent.View.Update(true);
Thank you for bringing this issue to our attention.
Regards,
Prakash
Syncfusion, Inc
AD
Administrator
Syncfusion Team
July 9, 2004 08:32 PM UTC
Hi Chuck,
This problem has been fixed! The next update of Essential Diagram will ship with the revised code.
Prakash
Syncfusion, Inc.