Click here to Skip to main content
15,890,282 members
Home / Discussions / WPF
   

WPF

 
Questionusing webcam with silverlight 4 - protection error Pin
shabya30-Sep-10 2:19
shabya30-Sep-10 2:19 
AnswerRe: using webcam with silverlight 4 - protection error Pin
Pete O'Hanlon30-Sep-10 2:26
mvePete O'Hanlon30-Sep-10 2:26 
GeneralRe: using webcam with silverlight 4 - protection error Pin
shabya30-Sep-10 2:29
shabya30-Sep-10 2:29 
GeneralRe: using webcam with silverlight 4 - protection error Pin
Pete O'Hanlon30-Sep-10 2:43
mvePete O'Hanlon30-Sep-10 2:43 
QuestionHow to begin storyboard based on ListBoxItem selection??? Pin
vladc7730-Sep-10 1:09
vladc7730-Sep-10 1:09 
AnswerRe: How to begin storyboard based on ListBoxItem selection??? Pin
Pete O'Hanlon30-Sep-10 1:31
mvePete O'Hanlon30-Sep-10 1:31 
QuestionCreating an instance of SelectionChangedEventArgs in wpf Pin
dashingsidds28-Sep-10 22:31
dashingsidds28-Sep-10 22:31 
AnswerRe: Creating an instance of SelectionChangedEventArgs in wpf Pin
Pete O'Hanlon28-Sep-10 22:55
mvePete O'Hanlon28-Sep-10 22:55 
Just because there's a SelectionChangedEventArgs parameter there, it doesn't mean you have to pass anything to it. If you don't actually do anything in the method with the value e, you can simply pass null in as the parameter.
lstMyView_SelectionChanged(lstMyView, null);
Similarly, if you don't do anything with sender, you can always pass null in there.

A simpler technique would be to move the functionality that lstMyView_SelectionChanged implements out into a separate method and call that directly (and from the event handler as well).

Now that we've covered that, I would urge you to look into MVVM to stop relying on the code behind here. If your method is updating a model in some way, you really should separate it out of the view specific code (obviously, if you are just triggering an animation or other view option then what you are doing here is perfectly fine and shouldn't be refactored outside the view).

I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

Forgive your enemies - it messes with their heads


My blog | My articles | MoXAML PowerToys | Onyx


GeneralRe: Creating an instance of SelectionChangedEventArgs in wpf Pin
dashingsidds28-Sep-10 23:01
dashingsidds28-Sep-10 23:01 
GeneralRe: Creating an instance of SelectionChangedEventArgs in wpf Pin
Pete O'Hanlon28-Sep-10 23:24
mvePete O'Hanlon28-Sep-10 23:24 
GeneralRe: Creating an instance of SelectionChangedEventArgs in wpf Pin
dashingsidds28-Sep-10 23:43
dashingsidds28-Sep-10 23:43 
GeneralRe: Creating an instance of SelectionChangedEventArgs in wpf Pin
Pete O'Hanlon29-Sep-10 0:58
mvePete O'Hanlon29-Sep-10 0:58 
GeneralRe: Creating an instance of SelectionChangedEventArgs in wpf Pin
dashingsidds29-Sep-10 1:24
dashingsidds29-Sep-10 1:24 
GeneralRe: Creating an instance of SelectionChangedEventArgs in wpf Pin
Pete O'Hanlon29-Sep-10 1:30
mvePete O'Hanlon29-Sep-10 1:30 
QuestionWhich obfuscator can I use? Pin
Aseem Sharma28-Sep-10 8:06
Aseem Sharma28-Sep-10 8:06 
AnswerRe: Which obfuscator can I use? Pin
Pascal Hubert28-Sep-10 8:28
Pascal Hubert28-Sep-10 8:28 
GeneralRe: Which obfuscator can I use? Pin
Aseem Sharma28-Sep-10 17:51
Aseem Sharma28-Sep-10 17:51 
GeneralRe: Which obfuscator can I use? Pin
Aseem Sharma30-Sep-10 20:19
Aseem Sharma30-Sep-10 20:19 
AnswerRe: Which obfuscator can I use? Pin
Pete O'Hanlon28-Sep-10 9:00
mvePete O'Hanlon28-Sep-10 9:00 
GeneralRe: Which obfuscator can I use? Pin
Aseem Sharma28-Sep-10 17:50
Aseem Sharma28-Sep-10 17:50 
GeneralRe: Which obfuscator can I use? Pin
Pete O'Hanlon28-Sep-10 21:47
mvePete O'Hanlon28-Sep-10 21:47 
GeneralRe: Which obfuscator can I use? Pin
Aseem Sharma30-Sep-10 20:20
Aseem Sharma30-Sep-10 20:20 
GeneralRe: Which obfuscator can I use? Pin
jmcc2k11-Oct-10 1:32
jmcc2k11-Oct-10 1:32 
Questionan unhandled win32 exception occurred in plugin-container.exe Pin
Manu Viswan27-Sep-10 23:47
Manu Viswan27-Sep-10 23:47 
QuestionPath.. on buttons dissapearing [modified] Pin
belier127-Sep-10 23:37
belier127-Sep-10 23:37 

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.