开发者

How do I create a visual wrapper in WPF that is, in OO terms, a strategy?

I have visual elements that represents parts of a process control system. Valve, pump, sensor etc.

The elements have common traits like alarm state, operational state etc

Different customers (and classification societies / regulatory bodies) demand applicati开发者_运维问答on specific ways of displaying these common traits. One way might be a border-like adorner (eg. alarm border). Another way may be a separate element that is visually offset from the decorated element (eg alarm panel).

How do I, in WPF, implement an element class member capable of, if it so decides, drawing a border around the element to which it was attached? But it could just as well do something else. One extreme example that comes to mind is for the alarm adorner to wrap the whole hosting element in a visualbrush and do transforms on it.


Would an Adorner suffice for your needs?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜