I have a code like this
<Window x:Class="SolutionName.ClassName" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="300" Width="300" WindowStartupLocation="CenterOwner"> <Window.Style> <Style TargetType="Window"> <Style.Triggers> <DataTrigger Binding="{Binding Path=ItemKind}" Value="SomeKind"> <Setter Property="Title" Value="SomeTitle"/> </DataTrigger> <DataTrigger Binding="{Binding Path=ItemKind}" Value="SomeKind2"> <Setter Property="Title" Value="SomeTitle"/> </DataTrigger>
I want to change the window title depending on the ItemKind property implemented in the viewmodel (set as a datacontext). The code above will not work, and I'm really confused because I cannot find any errors.
source share