views:

1275

answers:

1
+3  Q: 

WPF Layer Control

I'm in need of a WPF layer control that does the following

1) Have multiple layers of content on top of each other.

2) Ability to turn layers on/off at design and runtime, ie we need a UI maybe something like a tabbed control

3) Move layers up/down the stack

4) Change opacity for layers

Now I know all of the above is possible in Xaml/WPF. I've coded up a simple version using a grid, that has mutiple cells at design time, 1 cell = 1 layer, and only a single cell at runtime, all the cells are merged into one. Thing is that was a kludge, didn't give me the design time control that I needed, all controls end up with a single parent, ugly. Anyone got an off the shelf, or part working example - if not I'll code up a proper one and share it on CodePlex.

I'm sure I'm not the only person out there who needs this functionality, am I?

+2  A: 

With my previous client we accomplished this using Canvases. The application was a 'CAD' like in nature so our layers were responsible for graphical representations of the domain.

I do not know of any 3rd party tools that accomplish this at the moment.

I think the reasoning for this is that when you are looking for this functionality it is very specific to the domain & application.

If you were going to build your own control I would encourage building a custom control for managing the logic, then allow others to style the look and feel. It would be more of the Wpf way of approaching the problem.

In that way if 1 consumer wants to use canvases they could. If you wanted to use a grid, then you could as well.

If you have any psuedo code of what you would like to do, I can see if any of my old POCs can be modified to meet your needs. Or if you want to start a CodePlex project I wouldn't mind contributing.

That's just my 2 cents.

JB