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
3
votes
1 answer

Several MultiDataTriggers works only for the last one

In a UserControl I have a DP of type enum (GroupStyle of type eGroupStyle) and a DP of type bool (IsGrouped). I need to begin some storyboard in all possible conditions. But the last MultiDataTrigger works only. Where did I wrong? Also I'd like to…
Mehdi
  • 2,194
  • 2
  • 25
  • 39
3
votes
1 answer

Validation Rule not updating correctly with 2 validation rules

I Have looked through some posts regarding Validation Rules but havn't come across the problem I am experiencing. I am using a Validation Rule for a Textbox in a WPF Window. I have two checks, one for empty Textbox, and one for invalid characters…
Neill
  • 711
  • 2
  • 13
  • 32
3
votes
1 answer

Bind to element within Usercontrol from other Xaml file

Could anyone tell me how i can bind to a Element of a Usercontrol? Im trying to disable/enable a button using a datatrigger working together with IDataErrorInfo. so i usually do this like this when the elements are on the same view
Martijn
  • 404
  • 7
  • 16
3
votes
1 answer

ListBox expand selected item

I have the following code snippet (copy and paste into kaxaml, xamlpad, etc to try it) that collapses all but the selected item. However, I want to revert back to all visible when the mouse is not over the ListBox and I just cannot get it to work…
HiteshP
  • 757
  • 2
  • 8
  • 15
3
votes
2 answers

Styling a ListBoxItem depending on its index in the ListBox

I want to change the margin of the first item in the ListBox if SomeProperty value is 10, without code-behind. This is what I have so far:
Aris
  • 181
  • 3
  • 13
2
votes
2 answers

RxUI - WPF - Style DataTrigger binding with no DataContext

Caveat: Brand new to ReactiveUI. Trying to go full on RxUI with the intention of never setting a view's DataContext. I believe this can be done! Scenario: I have a button and the button has a style and that button's style has a MultiDataTrigger with…
Dustin
  • 216
  • 1
  • 9
2
votes
0 answers

WPF TextBlock MultiDataTrigger Grid.Column.Style doesn't work

I have a TextBlock and I have a MultiDataTrigger defined as, if both properties are false, then I want the TextBlock to move to an other grid column. Problem is the entire style doesn't work at all. It doesn't even set the default Grid.Column to 5.…
nikhil
  • 1,578
  • 3
  • 23
  • 52
2
votes
2 answers

C# WPF OR logical gate between ValidationRules

I'm using a combobox with validation and a save button as follows:
user1028741
  • 2,745
  • 6
  • 34
  • 68
2
votes
2 answers

Enable button when textbox is validated in WPF

I'm trying to disable/enable a button when a textbox is validated. I get the validation to work (I know that it works because it changes design). But I can't seem to get the button to change from disabled to enabled when the textbox is…
Verendus
  • 1,026
  • 1
  • 13
  • 26
2
votes
1 answer

TabItem BorderBrush not updating on IsMouseOver trigger

I have a MultiDataTrigger where if a property in my view model is true AND the IsMouseOver on the TabItem is true, then the Border should appear red with 2.5 thickness. I couldn't get both the property and IsMouseOver to work, so I tried just my…
jsirr13
  • 944
  • 2
  • 12
  • 38
2
votes
1 answer

Data Trigger Will Not Fire

I have the following Data Trigger set-up on a Control Template
Richard McGuire
  • 10,780
  • 8
  • 31
  • 34
2
votes
1 answer

Validation for empty text box

I have three text boxes on my wpf application. When the user enters the value in these text boxes and clicks on Add, these are added to the list and displayed in data grid. The text boxes are not bound to anything as such and I add these text box…
user1240679
  • 6,829
  • 17
  • 60
  • 89
2
votes
3 answers

How to check if a row has odd number?

I'm trying to set different color for odd rows using XAML. The datagrid in question has 3 different types of data, which I want to color differently, and simply changing AlternatingRowBackground won't do. I'm planning on using something…
Arsen Zahray
  • 24,367
  • 48
  • 131
  • 224
2
votes
1 answer

Different selection colors for different DataGrid rows

I'm trying to set different colors to different rows in datagrid, based on Type of the row and whether it is selected: