Click here to Skip to main content
15,891,747 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Is IEnumerable a sufficent type for WPF binding? Pin
Harry von Borstel12-Jan-12 9:28
Harry von Borstel12-Jan-12 9:28 
GeneralRe: Is IEnumerable a sufficent type for WPF binding? Pin
Abhinav S12-Jan-12 18:00
Abhinav S12-Jan-12 18:00 
GeneralRe: Is IEnumerable a sufficent type for WPF binding? Pin
Dean Oliver23-Jan-12 19:08
Dean Oliver23-Jan-12 19:08 
QuestionTooltip on DataGridTemplateColumn header [solved] Pin
Ravi Bhavnani11-Jan-12 6:01
professionalRavi Bhavnani11-Jan-12 6:01 
AnswerRe: Tooltip on DataGridTemplateColumn header Pin
Ravi Bhavnani11-Jan-12 6:10
professionalRavi Bhavnani11-Jan-12 6:10 
QuestionRIA Service not generating custom property Pin
Icarus12310-Jan-12 18:24
Icarus12310-Jan-12 18:24 
QuestionWPF Model From Hyperlink Pin
Kevin Marois10-Jan-12 10:50
professionalKevin Marois10-Jan-12 10:50 
GeneralRe: WPF Model From Hyperlink Pin
SledgeHammer0110-Jan-12 17:53
SledgeHammer0110-Jan-12 17:53 
Collin Jasnoch wrote:
The problem is getting the item. If you can find a way to get it you can pass it in using RelayComman<T>

There is no 'problem' involved in getting the item. You guys are half way to the 'correct' solution:

1) you are correct in that you have the VM expose a RelayCommand<T>. T in this case is going to be RoutedPropertyChangedEventArgs<object>.
2) the part of the puzzle that you guys are missing is an event to command mapper that is capable of forwarding the EventArgs as a command parameter.

#2 is absolutely necessary if you are writing a real MVVM app. How else are you going to forward control events to your VM? Smile | :)

The one I use in my MVVM framework is based off of MVVMLight's EventToCommand class. You simply create an interaction trigger for the event you are trapping and use the EventToCommand class to map it to the command and set the ForwardEventArgs=true. All via XAML.
GeneralRe: WPF Model From Hyperlink Pin
SledgeHammer0111-Jan-12 6:30
SledgeHammer0111-Jan-12 6:30 
AnswerRe: WPF Model From Hyperlink Pin
SledgeHammer0111-Jan-12 6:34
SledgeHammer0111-Jan-12 6:34 
QuestionWPF TabControl Events Pin
Tom Delany10-Jan-12 5:03
Tom Delany10-Jan-12 5:03 
GeneralRe: WPF TabControl Events Pin
Pete O'Hanlon10-Jan-12 9:57
mvePete O'Hanlon10-Jan-12 9:57 
GeneralRe: WPF TabControl Events Pin
Tom Delany10-Jan-12 10:15
Tom Delany10-Jan-12 10:15 
GeneralRe: WPF TabControl Events Pin
Pete O'Hanlon10-Jan-12 10:29
mvePete O'Hanlon10-Jan-12 10:29 
GeneralRe: WPF TabControl Events Pin
Tom Delany10-Jan-12 10:35
Tom Delany10-Jan-12 10:35 
GeneralRe: WPF TabControl Events Pin
Tom Delany10-Jan-12 10:17
Tom Delany10-Jan-12 10:17 
GeneralRe: WPF TabControl Events Pin
Pete O'Hanlon10-Jan-12 10:32
mvePete O'Hanlon10-Jan-12 10:32 
GeneralRe: WPF TabControl Events Pin
Tom Delany10-Jan-12 10:37
Tom Delany10-Jan-12 10:37 
GeneralRe: WPF TabControl Events Pin
Pete O'Hanlon10-Jan-12 10:38
mvePete O'Hanlon10-Jan-12 10:38 
GeneralRe: WPF TabControl Events [Edited] Pin
Tom Delany10-Jan-12 11:34
Tom Delany10-Jan-12 11:34 
GeneralRe: WPF TabControl Events [Edited] Pin
Mycroft Holmes10-Jan-12 13:11
professionalMycroft Holmes10-Jan-12 13:11 
GeneralRe: WPF TabControl Events Pin
Tom Delany10-Jan-12 14:08
Tom Delany10-Jan-12 14:08 
GeneralRe: WPF TabControl Events Pin
Tom Delany11-Jan-12 3:40
Tom Delany11-Jan-12 3:40 
GeneralRe: WPF TabControl Events Pin
Tom Delany12-Jan-12 7:53
Tom Delany12-Jan-12 7:53 
GeneralRe: WPF TabControl Events [Edited] Pin
Tom Delany11-Jan-12 8:32
Tom Delany11-Jan-12 8:32 

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.