Set Window Properties based on Datatype of UserControl
- by Kage
I've got a simple window, that is container for various views. I've got a DataTemplate that shows the correct view based on whatever the window's MainViewModel property is set to.
<DataTemplate DataType="{x:Type VM:StartupViewModel}">
<AdornerDecorator>
<V:StartupView />
</AdornerDecorator>
</DataTemplate>
What I'd like to do is for certain views, change some properties on the base window, ie WindowStyle, ResizeMode etc. something like triggers, but on datatypes instead of property values?
How could I accomplish this?