We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

World coord in a specialized Model

Thread ID:

Created:

Updated:

Platform:

Replies:

9106 Dec 5,2003 10:45 PM UTC Dec 8,2003 10:18 PM UTC WinForms 2
loading
Tags: Diagram
Apolon Ivankovic
Asked On December 5, 2003 10:45 PM UTC

How do you get a model to use specific world coordinates? I have a Model specialization which sets the MeasurementUnits to WorldCoordinates and the Bounds to the relevant world coord range. This is done in the model constructor. When the diagram is displayed the specialized model is definitely used but the MeasurementUnits and Bounds are set to their defaults (Pixel, 1056x816).

Administrator [Syncfusion]
Replied On December 8, 2003 06:33 PM UTC

Here''s what is probably happening. Those properties are serialized at design-time. You set them in your constructor, but your Form.InitializeComponent() method is turning around and setting them back. One solution is to change the properties through the design-time environment. Another solution is to override the properties in your model, disable design-time serialization using DesignerSerializationVisibilityAttribute, and then always return the values you want from the the property get methods. >How do you get a model to use specific world coordinates? > >I have a Model specialization which sets the MeasurementUnits to WorldCoordinates and the Bounds to the relevant world coord range. This is done in the model constructor. When the diagram is displayed the specialized model is definitely used but the MeasurementUnits and Bounds are set to their defaults (Pixel, 1056x816).

Apolon Ivankovic
Replied On December 8, 2003 10:18 PM UTC

Yep it was the design time serialization that was overriding the values. When I go the design time setting approach, the Model.MeasurementUnits property refuses to stay at a value of World. If the override/visibility-hidden approach is taken, the MeasurementUnits property also doesn''t stay at the Value of World set in the code. Is Model.MeasurementsUnits = World a value option? The work I''m doing is a diagram editor for a legacy system where the graphic work space is 32767x32767 virtual units in size. Can this be achieved using Essential Diagram and what Model settings should I use to achieve this?

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;