Questions tagged [multidatatrigger]

Represents a trigger that applies property values or performs actions when the bound data meet a set of conditions.

Represents a trigger that applies property values or performs actions when the bound data meet a set of conditions. Used in WPF.

100 questions
1
vote
0 answers

c# Wpf 4 MultiDataTriggers

I want to create a Button that changes by a bool and isMouseOver value. player is playing -> Pause_grey.png player is playing & mouseIsOver-> Pause_blue.png player is stopped -> Play_grey.png player is stopped & mouseIsOver -> Play_blue.png I…
Kilian E.
  • 11
  • 3
1
vote
1 answer

MultiDataTrigger Not firing once the button isEnabled property is changed from code behind

I have a button which is enabled/disabled based on validation.hasError property of few textboxes and it works fine, untill i wanna disable and enable this same button from code behind based on some business logic. for example. if(recordExist) {…
Abdullah Malikyar
  • 231
  • 1
  • 4
  • 19
1
vote
0 answers

C#/WPF - Shared Style Setters

I'm trying to style a set of controls which display levels for a device. I'm using a Label control that has a style with a multidata trigger which checks if the value of that field is between a certain value, and applies a highlight to indicate an…
Arthur
  • 75
  • 1
  • 8
1
vote
2 answers

WPF Enable Disable Border based on MultiDataTrigger not working

I have a border in WPF that I am trying to enable or disable based on two properties in the viewmodel: ConnectedVisibility and OperatingMode. This data trigger disables the border when connectedvisibility visibility is not set to "Visible". But it…
1
vote
1 answer

WPF multitrigger referencing 2 other controls

I have two CheckBoxes and a TextBox. I want to TextBox to have IsEnabled=False if both CheckBoxes have IsChecked=False. Can I do this with a MultiTrigger? I keep getting errors trying to use the Source property. I have it working with…
BrettRobi
  • 3,793
  • 7
  • 40
  • 64
1
vote
2 answers

WPF How to set visibility of parent container from a data template

I have create a DataTemplate for my Component object. I added DataTrigger to determine if the component should be visible or not. Essentially we have filters and the code checks those filters to determine if the component should be Visible or…
gmang
  • 435
  • 1
  • 6
  • 20
1
vote
1 answer

How to use MultiDataTrigger to check a single condition to be true in Style.Triggers in WPF?

I have three grids in my UserControl of which one control is shown at time. In the last column I need to use a Style where I need to check the data and apply a ForeGround color. I can write style at each of the control in 3 grids using DataTriggers.…
munna
  • 11
  • 1
1
vote
2 answers

Disable/Enable Button based on WPF DatePicker Validation using MVVM

I got a ViewModel which handles Validation using the IDataErrorInfo Interface. This works fine for ComboBoxes, TextBoxes, Checkboxes, etc. The DatePicker seems to Validate the Input itself based on the Binding to a "DateTime?" property inside the…
M C
  • 626
  • 1
  • 11
  • 27
1
vote
1 answer

Why does Button.IsEnabled not start as false or reset to false when the MultiDataTrigger conditions are not satisfied?

I have a usercontrol hosted in an office Taskpane, for a Word addin. I have tried following the answer to DataTrigger to make WPF Button inactive until TextBox has value and the answer to Cleanest way to bind a Button's visibility to the contents of…
Hydronium
  • 793
  • 1
  • 11
  • 28
1
vote
1 answer

Must have non-null value for 'Setter.Property'

I am reading this article on MSDN site, in order to understand DataTrigger. I have created a DefaultViewModel class which looks like this. namespace ControlTemplateDemo { public class DefaultViewModel { private List
user2243747
  • 2,767
  • 6
  • 41
  • 61
1
vote
2 answers

How can I desaturate selected rows when DataGrid is out of focus?

The normal convention for UI controls is for selected text, items, or rows to be brightly colored (e.g., bright blue) when the parent control is in focus and desaturated/dim (e.g., pale blue) when the control is out of focus. In contrast to the…
devuxer
  • 41,681
  • 47
  • 180
  • 292
1
vote
2 answers

Binding inside a XAML ResourceDictionary

I have a horrible feeling what I'm trying to do cannot be done, but here goes. Maybe there's a better way. I have a ResourceDictionary in a separate file, being pulled into a UserControl (View):
Antony Woods
  • 4,415
  • 3
  • 26
  • 47
1
vote
1 answer

How to bind a parents property to the child elements datatemplate

I need to bind the RowStyle property of my DataGrid to the Visibility if the DataGrids childrens through a converter. The thing is that the children exists in a DataTemplate. My code below is a simplified version of what I am doing right now, so It…
user1538142
  • 87
  • 1
  • 7
1
vote
1 answer

using EntityFramework model as datacontext in wpf

I'm creating a simple WPF application that needs to display/Edit data from SQL server using Entity Framework Model. I created a small test window to see how things work and i noticed that property changed events and data validation are kind of…
Yoav
  • 3,326
  • 3
  • 32
  • 73
0
votes
1 answer

trim string value in a multitrigger without a converter?

I have a MultiTrigger that I use to color the values of my DataGrid control. This trigger was working fine until recently when I discovered the color no longer worked. I looked at the database and discovered that blank spaces were trailing my value…
TWood
  • 2,563
  • 8
  • 36
  • 58