Posts

Showing posts with the label datatrigger

WPF C# DataTrigger Binding to OnPropertyChanged

WPF C# DataTrigger Binding to OnPropertyChanged I'm trying to create a DataTrigger which changes the style of a border whenever a certain property is changed. I've created the property and I'm calling the PropertyChanged event and it works perfectly fine with other XAML components, but for some reason, it won't work with my DataTrigger. XAML File: <Style x:Key="InputParameterBorder" TargetType="Border" BasedOn="{StaticResource ParameterBorder}"> <Setter Property="Background" Value="{StaticResource GrayGradient}"/> <Style.Triggers> <!-- This changes input color --> <DataTrigger Binding="{Binding Parameter, Converter={StaticResource IsNullConverter}}" Value="False"> <Setter Property="Background" Value="{StaticResource YellowGradient}" /> </DataTrigger> </Style.Trig...