Top "Datatrigger" questions

a WPF .NET trigger that applies property values or performs actions when the underlying bound data meets a specified condition.

Set IsEnabled Property of ComboBox Based on SelectedItem

I want to enable/disable a ComboBox based on if there is an item selected in another ComboBox. I was …

c# wpf combobox datatrigger isenabled
How do I bind a datatrigger in xaml to a code-defined dependency property?

My code behind for a window defines a dependency property, "Active"... public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } public …

c# xaml data-binding datatrigger
WPF: How do I set the Foreground property of a TextBlock using DataTrigger

This is my XAML: <TextBlock Name="SeverityText" Grid.Column="1" Grid.Row="0" Foreground="Red"> <TextBlock.Triggers> <…

wpf textblock datatrigger foreground
What is the replacement for DataTrigger in Silverlight

This is my scenario. I have 2 Properties. Type and State. Type is an Enum with 3 values eg, ball, car, arrow. …

silverlight silverlight-4.0 datatrigger vsm
[Multi]DataTrigger "OR" statement?

I want my image Visibility property set to Hidden when my bound table field Weblink = NULL **OR** Weblink = "" With MultiDataTrigger …

wpf datatrigger
Switch (Select) statement in Xaml Binding?

Is there a way to create a conditional binding in XAML? Example: <Window x:Name="Me" DataContext="{Binding ElementName=…

wpf xaml binding switch-statement datatrigger
In WPF, is the FallbackValue used when the binding fails due to null references?

My view-model exposes a list called MyList that may be empty or null. I have an element that I would …

c# wpf data-binding datatrigger
ControlTemplate with DataTrigger Vs. DataTemplate with DataTemplateSelector

I have a generic control which displays an editor based on the type property inside a ViewModel. Currently it's implemented …

wpf datatemplate controltemplate datatrigger datatemplateselector
WPF TextBlock Negative Number In Red

I am trying to figure out the best way to create a style/trigger to set foreground to Red, when …

wpf triggers styles textblock datatrigger
TemplateBinding from a Style DataTrigger In ControlTemplate

In the following XAML I'm using a Rectangle with a Border as the Template for a ToggleButton. I want the …

wpf datatrigger templatebinding control-template