This is a migrated thread and some comments may be shown as answers.

Multiple layers in WPF Diagram Designer

1 Answer 94 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kavita
Top achievements
Rank 1
Kavita asked on 17 Apr 2013, 05:46 AM

I need to create a wpf diagram designer which consist multiple layers design (user can add layers according to their need, can switch among layers and can also show/ hide layers) and each layer can have different diagram but they are part of single design. Now my question is that how we can create multiple layers like we have different layers in Photoshop where layers are used to work on individual parts of an image while not affecting other parts. And the same thing I have to create in wpf diagram designer if it's possible or also looking for any alternative solution.... 

1 Answer, 1 is accepted

Sort by
0
Lancelot
Top achievements
Rank 1
answered on 17 Apr 2013, 02:54 PM
Hi Kavita,

This isn't a feature built into the control, but you can create your own "layers" by using the ZIndex property of the diagram shapes. The z index is the relative distance away from the diagram surface. For example, lets say you have a collection of shapes that you want to be layer one, then you given them all a ZIndex of 1, then for the shapes in layer 2 would have a ZIndex of 2 and so on. 

Now you effectively have layers. What you do with the layers is up to you.This tutorial in the documentation shows you how to programmatically manipulate the ZIndex of the diagram items.

Good Luck,
Lancelot
Tags
General Discussions
Asked by
Kavita
Top achievements
Rank 1
Answers by
Lancelot
Top achievements
Rank 1
Share this question
or