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?
edit:
After a bit more googling I think I want to do something like this:
<Window.Style>
<Style>
<Setter Property="Window.WindowStyle"
Value="SingleBorderWindow" />
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self} , Path=DataContext.MainViewModel}"
Value="{x:Type VM:StartupViewModel}">
<Setter Property="Window.WindowStyle"
Value="None" />
</DataTrigger>
</Style.Triggers>
</Style>
</Window.Style>
This rums, but has no effect...