Click here to Skip to main content
15,914,225 members
Home / Discussions / WPF
   

WPF

 
QuestionWPF - Quick Design Question Pin
Kevin Marois18-Dec-15 5:53
professionalKevin Marois18-Dec-15 5:53 
AnswerRe: WPF - Quick Design Question Pin
Joseph M. Morgan18-Dec-15 7:24
Joseph M. Morgan18-Dec-15 7:24 
QuestionUsing DataTemplates Trigger for listbox Pin
Saurabh18cs17-Dec-15 21:35
Saurabh18cs17-Dec-15 21:35 
AnswerRe: Using DataTemplates Trigger for listbox Pin
Joseph M. Morgan18-Dec-15 7:27
Joseph M. Morgan18-Dec-15 7:27 
GeneralRe: Using DataTemplates Trigger for listbox Pin
Saurabh18cs20-Dec-15 21:49
Saurabh18cs20-Dec-15 21:49 
GeneralRe: Using DataTemplates Trigger for listbox Pin
Joseph M. Morgan21-Dec-15 2:19
Joseph M. Morgan21-Dec-15 2:19 
GeneralRe: Using DataTemplates Trigger for listbox Pin
Saurabh18cs21-Dec-15 15:28
Saurabh18cs21-Dec-15 15:28 
GeneralRe: Using DataTemplates Trigger for listbox Pin
Joseph M. Morgan30-Dec-15 6:00
Joseph M. Morgan30-Dec-15 6:00 
Here is an example from "WPF Succinctly" which is a free e-book from Syncfusion.
(I am not connected to them, so I am putting their library link here for everyone.)

XML
<Trigger Property="IsPressed" Value="True">
	<Setter TargetName="Border" Property="Background" Value="Purple" /> 
	<Setter TargetName="Border" Property="BorderBrush" Value="DarkKhaki" /> 
</Trigger


According to the book, the data template or control template is the place to put the triggers.
Note that the property IsPressed is the property to be evaluated. In your case, it is the value of the check box, if I recall correctly. The Value property is the value you want that target property to have in order to fire the trigger. Without knowing your data structures, I am not sue what the binding is doing in your example. I am also not sure why you are using a tag instead of the value of the checkbox. If you use the template for the checkbox control, and the value of "true" is what you want to trigger the modifications, then you should be using this data template for the checkbox and use "True" on the Value property, I would think.
If I am wrong and you are selecting from multiple items as in a radio button group, then you would need to evaluate the value of the group and the trigger would be set on that.

Mind you, I am very new to WPF as well, so this is just my take on what the experts have written. I recommend both this book and some of the tutorials on line through Packtpub and Safari Online, if you have subscriptions to either.
Joseph M. Morgan ("Joey")
Lairhaven Enterprises/Solstice Systems
Waynesboro, Virginia, USA

GeneralRe: Using DataTemplates Trigger for listbox Pin
Saurabh18cs30-Dec-15 15:47
Saurabh18cs30-Dec-15 15:47 
AnswerRe: Using DataTemplates Trigger for listbox Pin
Saurabh18cs22-Dec-15 22:14
Saurabh18cs22-Dec-15 22:14 
GeneralRe: Using DataTemplates Trigger for listbox Pin
Pete O'Hanlon22-Dec-15 22:31
mvePete O'Hanlon22-Dec-15 22:31 
GeneralRe: Using DataTemplates Trigger for listbox Pin
Saurabh18cs22-Dec-15 23:44
Saurabh18cs22-Dec-15 23:44 
GeneralRe: Using DataTemplates Trigger for listbox Pin
Saurabh18cs4-Jan-16 19:28
Saurabh18cs4-Jan-16 19:28 
AnswerRe: Using DataTemplates Trigger for listbox Pin
Saurabh18cs4-Jan-16 22:15
Saurabh18cs4-Jan-16 22:15 
QuestionCreate Simple WPF datagrid Pin
Baburc10-Dec-15 6:39
Baburc10-Dec-15 6:39 
AnswerRe: Create Simple WPF datagrid Pin
Gerry Schmitz11-Dec-15 7:25
mveGerry Schmitz11-Dec-15 7:25 
GeneralRe: Create Simple WPF datagrid Pin
Baburc11-Dec-15 7:40
Baburc11-Dec-15 7:40 
QuestionHave I done something REALLY dumb? Pin
Mycroft Holmes25-Nov-15 20:29
professionalMycroft Holmes25-Nov-15 20:29 
AnswerRe: Have I done something REALLY dumb? Pin
Gerry Schmitz26-Nov-15 6:30
mveGerry Schmitz26-Nov-15 6:30 
GeneralRe: Have I done something REALLY dumb? Pin
Mycroft Holmes26-Nov-15 11:50
professionalMycroft Holmes26-Nov-15 11:50 
GeneralRe: Have I done something REALLY dumb? Pin
Gerry Schmitz26-Nov-15 13:59
mveGerry Schmitz26-Nov-15 13:59 
GeneralRe: Have I done something REALLY dumb? Pin
Mycroft Holmes26-Nov-15 22:33
professionalMycroft Holmes26-Nov-15 22:33 
GeneralRe: Have I done something REALLY dumb? Pin
Gerry Schmitz27-Nov-15 6:10
mveGerry Schmitz27-Nov-15 6:10 
GeneralRe: Have I done something REALLY dumb? Pin
Mycroft Holmes27-Nov-15 12:34
professionalMycroft Holmes27-Nov-15 12:34 
GeneralRe: Have I done something REALLY dumb? Pin
Gerry Schmitz27-Nov-15 14:20
mveGerry Schmitz27-Nov-15 14:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.