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. Image for the cookie policy date
close icon

Move Group/layer

Is there a way to move a layer or a layer in a page ?

6 Replies

AD Administrator Syncfusion Team April 26, 2006 01:53 PM UTC

Thanks Meera But ir does not explain how to MOVE the layer. It only sets it visible.


AD Administrator Syncfusion Team April 26, 2006 02:00 PM UTC

Thanks but it does explain how to programtically move the layer...


AD Administrator Syncfusion Team April 26, 2006 02:15 PM UTC

Correction: The question should be read : How to move a group/Layer (what is the best ?) in a view/model Actually, i want my user to draw some parts (each one is invisible to the other) and then position the nodes(of the group or the layer) in a certain way on the page


AD Administrator Syncfusion Team April 26, 2006 02:22 PM UTC

Hi Paul, Please refer the Diagram Samples/InDepth/NetworkFlowModel sample which demonstrates about how to use different layers ,to add nodes to the layers and make them as visible/invisible. Depending on the visible state of the layer the samples present in the layer are shown/hidden. Please let me know if you have any questions. Thanks, Meera.


AD Administrator Syncfusion Team April 26, 2006 03:17 PM UTC

I think i found how to do it via the MoveCommand. The question is how to get a INodeCollection of the nodes of a Layer > >Hi Paul, > >Please refer the Diagram Samples/InDepth/NetworkFlowModel sample which demonstrates about how to use different layers ,to add nodes to the layers and make them as visible/invisible. Depending on the visible state of the layer the samples present in the layer are shown/hidden. > >Please let me know if you have any questions. > >Thanks, >Meera.


AD Administrator Syncfusion Team April 27, 2006 01:39 PM UTC

Hi Paul, If your intention is to iterate through the nodes collection in the Layer , you can get it done by using the Layer.GetEnumerator() which returns an enumerator that can be used to iterate through the nodes in the given Layer according to their Z-order. Add the following code snippet to the NetworkFlowModel sample in particular to the toolBar_ButtonClick Event code block. if(e.Button.Tag.ToString() == "EtherNet") { Layer ethernet = this.diagram1.Model.Layers["EtherNet Layer"]; ethernet.Visible = !e.Button.Pushed; this.SetConnectingLinksVisibility(ethernet); //Iterating Layer nodes ArrayList nodesinZOrder = new ArrayList(); int count =0; IEnumerator inodes = ethernet.GetEnumerator(); while(inodes.MoveNext()) { if(inodes.Current is Symbol) { Symbol newsymbol = inodes.Current as Symbol; MessageBox.Show(newsymbol.Name.ToString(),ethernet.Name.ToString()); nodesinZOrder.Add(inodes.Current); } } } Please let me know if you have any further queries regarding this. Regards, Praveena.

Loader.
Live Chat Icon For mobile
Up arrow icon