Hi,
when using PRISM the normal way to hookup things with unity is to define an interface and register an implementation with this interface. Now, I have a problem regarding views. The scenario is simple:
Assume a custom video control which allows to set a Play command. This control is defined by a simple interface "IPlayControlView". The obvious problem, when I resolve this control and try to add it to a StackPanel, it does not work, because I have an IPlayControl, not an UIElement.
I can cast it to UIElement, because I know that it is an UIElement. But is there any better way, something like
public interface IPlayControlView : UIElement
This does not work, but maybe some other thing will do the trick...
It is kind of a general question, if I resolve views using interfaces I will run into this problem every time. Perhaps its not the way it is done, but I always thought one of the .... Ok, just got an idea. I will just extend the IPlayControl with one property UIElement and set this as reference to itself. So, nevermind, question answered while typing :-)
If there is a better way, I always like to learn new things. Perhaps a IUIElement?
Chris