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

Problem when Add/remove and change offset y of nodes at runtime on a manual layeout diagram

Thread ID:

Created:

Updated:

Platform:

Replies:

102117 Dec 28,2011 11:17 AM UTC Jan 26,2012 03:27 AM UTC WPF 9
loading
Tags: Diagram
donna
Asked On December 28, 2011 11:17 AM UTC

I created a manual diagram .
on run time I added new nodes to the diagram and updated OffsetY of existing nodes .

but the diagram visual look did not changed !!!.

I tried to do refresh but at the documentation there is only tablelayeout refresh or hierarchialLayout refresh but I did not find how to do refresh to the manual layout diagram.






Ramya Thirugnanam [Syncfusion]
Replied On January 2, 2012 07:17 AM UTC

Hi Donna,

With regards to dynamically change the position of the node, call the InvalidateMeasure() and InvalidateArrange() of the DiagramPage after specifying the offset values of the Node as provided in following code snippet.

Code Snippet:
DiagramPage page = diagramView.Page as DiagramPage;
page.InvalidateMeasure();
page.InvalidateArrange();

Please let us know if you have any concerns.
Regards,
Ramya



donna
Replied On January 3, 2012 05:16 AM UTC

I did the same :

DiagramPage page = diagramView.Page as DiagramPage;
page.InvalidateMeasure();
page.InvalidateArrange();

but it does not work.

I created a new manual layout diagram.

than, I created a button "Add new node" , when clicking on the button I add new node to the diagram , but the visual look of the diagram does not changed.

I also change Y offset of other nodes when I add new Node , but Y offset does not changed also.

I also added a new button "Delete node" , diagramModel.Nodes.RemoveAt(i) and it removed from the diagramModel but the visual look of the diagram does not changed.




Ramya Thirugnanam [Syncfusion]
Replied On January 5, 2012 05:19 AM UTC

Hi Donna,

With regards to Problem when Add/remove and change offset y of nodes at runtime, We are unable to reproduce the reported issue. We have created a simple to represent this. Please refer to the sample from the attachment.

If you feel still this issue exists, please get back us with simple sample to reproduce the issue.

Please let us know if you have any concerns
Regards,
Ramya




ManualLayoutDiagram_cc6609f8.zip

donna
Replied On January 5, 2012 12:55 PM UTC

Yes it works when the button is on the diagram .

But In my application it does not work because the diagram is a userControl in a wpf window page. the button "add new node" is on the page and not on the UserControl. when I click on the node it updates the data base first and after that send callback to the usercontrol , and only then I added the new node .

diagramMode.nodes.add(node);

But I cannot see the new node !

the visual look of the diagram did not changed !!!




Ramya Thirugnanam [Syncfusion]
Replied On January 11, 2012 03:40 AM UTC

Hi Donna,

With regards to Problem when Add/remove and change offset y of nodes at runtime, there are many ways to achieve the database interactivity and call back mechanism. So, Please provide us a simple sample to represent your scenario.we would be able to investigate further on this and update you with an appropriate solution.

Please let us know if you have any concerns.
Regards,
Ramya



donna
Replied On January 18, 2012 10:52 AM UTC

Hello,

I sent you a project which has the problem:

I created Page1 and Page 2.

Page1 is empty , Page2 has a manual diagram.

1) Go to page2( click on button "Diagram")
2) Press "Add new node"
3) It works.
4) Than go again to page1.
5) Than go again to page2. ( The diagram created again without the new node , it's ok ).

6) Than press again "Add new node".
7) not ok ! , The node added to the diagrammodel.itemsource but not shown on the screen .



ManualLayoutDiagram_7411be18.zip

Ramya Thirugnanam [Syncfusion]
Replied On January 20, 2012 07:33 AM UTC

Hi Donna,

With regards to Problem when Add/remove and change offset y of nodes at runtime on a manual layout diagram, after analyzing the provided sample we came to know that you are using the Frames for Navigation.

Frame:
Frame is a content control that provides the ability to navigate to and display content. Frame can be hosted within other content, as with other controls and elements.

Problem:
Frame does not store an instance of a content object in navigation history. Instead, Frame creates a new instance of the content object each time it is navigated to by using navigation history. This behavior is designed to avoid excessive memory consumption when large numbers and large pieces of content are being navigated to. Consequently, the state of the content is not remembered from one navigation to the next.

The similar thing is happened when clicking the Button for Navigating to Diagram, it creates new diagramControl (after adding the Newnode).

For storing a state for a piece of content in navigation history, please refer to the following link.

About Frames: http://msdn.microsoft.com/en-us/library/ms750478.aspx#Cookies
Navigation History: http://msdn.microsoft.com/en-us/library/system.windows.navigation.customcontentstate.aspx

Please let us know if you have any concerns.
Regards,
Ramya



donna
Replied On January 22, 2012 07:33 AM UTC

I know that when using frame the diagram is created again .

this is not a problem because in my real application I save the diagram content to database and than each time the page is loaded I create the diagram from the database.

Please look again at the project I sent you.

My problem is that :

1. Enter the diagram page in my application
2. go out from the diagram page ( go to page1)
3. go back to page2 ( diagram page).
4 then press "add new node". the new node is NOT created on the screen . please watch and see.
I need your help as soon as possible .

thanks



Ramya Thirugnanam [Syncfusion]
Replied On January 26, 2012 03:27 AM UTC

Hi Donna,

With regards to Problem when Add/remove and change offset y of nodes at runtime on a manual layout diagram, we are working on this to find the root cause of this reported issue. We will update you with the solution on January 31st 2012. In order to have a better track with this, please create your customer account in Direct Trac and open a new incident so that we will assist you accordingly.

Our Direct Trac support system can be accessed from the following link:

Link: https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

For more information, you can contact our sales team at salessupport@syncfusion.com

Please let us know if you have any concerns.
Regards,
Ramya



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

;