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
102
votes
3 answers

WPF Error: Cannot find governing FrameworkElement for target element

I've got a DataGrid with a row that has an image. This image is bound with a trigger to a certain state. When the state changes I want to change the image. The template itself is set on the HeaderStyle of a DataGridTemplateColumn. This template has…
KDP
  • 1,377
  • 3
  • 11
  • 13
17
votes
5 answers

Is it possible to get a popup to ignore MenuDropAlignment in a WPF / Touch app?

As a bit of background - Windows has a facility for Touch/TabletPCs whereby it shifts the position of popups/menus depending on your "handedness" (to prevent the menu appearing under your hand). Essentially what this does is if you are set to…
Steven Robbins
  • 26,441
  • 7
  • 76
  • 90
16
votes
2 answers

What's the right way to trigger on multiple conditions in a WPF Style

My WPF application has a DataGrid control in it. I have a default custom style for the DataGridRow class which works well. However, for this one particular DataGrid on this one particular screen, I need a different custom style. The Items in each…
Tony Vitabile
  • 8,298
  • 15
  • 67
  • 123
10
votes
2 answers

WPF Trigger when Property and Data value are true

I need to be able to change the Style of a control when a property and data value are true. For example, my bound data has an IsDirty property. I would like to change the background color of my control when IsDirty is true AND the control is…
KrisTrip
  • 4,943
  • 12
  • 55
  • 74
8
votes
2 answers

WPF MultiDataTrigger AND condition

I would like to enable a button only when both of my two datagrids have selected items. Right now it is enabled when either of the datagrids have selections. Any ideas?
8
votes
2 answers

Efficiency of (multiple) MultiDataTrigger vs. Converter

I'm currently analyzing some XAML that uses style that make extensive use of MultiDataTriggers (8-10 multi data triggers per style, with 4-6 conditions per trigger). When looking at this I'm considering whether it would be more efficient to use a…
slugster
  • 49,403
  • 14
  • 95
  • 145
6
votes
2 answers

Using DataTrigger with more than one values in WPF

I am using XAML code part of which is
Jainendra
  • 24,713
  • 30
  • 122
  • 169
5
votes
2 answers

How can I combine a Trigger with a SourceName and a DataTrigger?

In my WPF control, I have the following two triggers: and
ygoe
  • 18,655
  • 23
  • 113
  • 210
4
votes
1 answer

HighlightBrushKey settings not working in Windows 7

I have the following style defined in my Resource Dictionary:
TriStar
  • 173
  • 1
  • 4
  • 14
4
votes
2 answers

How to put a comparison in a multidatatrigger

How can we put a comparison in a MultiDataTrigger? Ina normal DataTrigger, we could put it as such:
Sangeetha
  • 485
  • 2
  • 9
  • 24
4
votes
1 answer
3
votes
1 answer

DataTrigger.EnterActions.BeginStoryboard not Beginning

The purpose of this XAML is to animate a ListBox. The Selected ListBoxItem is Zoomed X2 The NotSelected ListBoxItem is Zoomed X.5 When nothing is selected, they are Zoomed X1 However, these Storyboards are not acting as expected. (just copy this…
Jerry Nixon
  • 31,313
  • 14
  • 117
  • 233
3
votes
1 answer

Changing focus in xaml

I have a problem changing the focus to some button on xaml. The code I am attemps to do it looks as follows (if some conditions are fulfilled then the focus should be set to the button. The strange is that for test purposes I'm also chaning the…
niao
  • 4,972
  • 19
  • 66
  • 114
3
votes
1 answer

Can you use routed events with a MultiTrigger?

Does WPF support using a triggers that respond to routed events but only given a condition is met? For example, WPF supports triggering on routed events through Event Triggers. ie:
Marchy
  • 3,334
  • 5
  • 37
  • 27
3
votes
3 answers

How to access controls parent's property in a style

My Listview has items datatemplated as a label. I'm designing a style for that label and I don't know how to access the parent's(ListViewItem) IsSelected property. EDIT - tried the suggestions below, but still getting an exception, here's my…
Marko Devcic
  • 1,069
  • 2
  • 13
  • 16
1
2 3 4 5 6 7