Implement Layers on top of Canvas in WPF - How to
-
each object on Canvas can be added to one of the layer (say layer 1, 2, 3) and is hidden. only one layer is visible at a time and only targetted portion of the layer show expose the object in it. any idea how to acheive this in wpf???
- Regards -
J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
-
each object on Canvas can be added to one of the layer (say layer 1, 2, 3) and is hidden. only one layer is visible at a time and only targetted portion of the layer show expose the object in it. any idea how to acheive this in wpf???
- Regards -
J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
There are many different ways of achieving this, and the answer really depends on what you are most comfortable with: You could add multiple canvases, and just display one depending on the particular one you need. You could implement one canvas, with a collection of layer items which contains as properties, the objects you want to display and a single flag determining whether or not the layer was visible. You could have a collection of all objects (this is the one I wouldn't choose if I were you), and have a flag on each determining whether or not it was visible.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
each object on Canvas can be added to one of the layer (say layer 1, 2, 3) and is hidden. only one layer is visible at a time and only targetted portion of the layer show expose the object in it. any idea how to acheive this in wpf???
- Regards -
J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers