I was wondering if it's possible to write something like this:
<Window
... xmlns definitions ...
DataContext=<!--Create an instance here-->
></Window>
Instead of this:
<Window
... xmlns definitions ...
>
<Window.DataContext>
<local:CustomViewModel />
</Window.DataContext>
</Window>
I don't need workarounds to achieve the same effect, I'm just curious if the first kind of syntax is possible at all. I don't think that's the case but it's worth asking.