Click here to Skip to main content
12,754,607 members (34,954 online)

Silverlight / WPF

 
QuestionSet Backgroundcolor when CheckBox in TreeView is checked Pin
Member 963452828-Nov-12 0:43
memberMember 963452828-Nov-12 0:43 
QuestionWPF Grid Splitter Problem Pin
Kevin Marois27-Nov-12 17:27
memberKevin Marois27-Nov-12 17:27 
QuestionWPF Dispatch.Invoke/BeginInvoke deadlock? Pin
devvvy26-Nov-12 20:30
memberdevvvy26-Nov-12 20:30 
Answer[SOLN FOUND] - it is NOT that Dispatcher.Invoke buggy! Pin
devvvy29-Nov-12 15:15
memberdevvvy29-Nov-12 15:15 
GeneralRe: [SOLN FOUND] - it is NOT that Dispatcher.Invoke buggy! Pin
Paulo Zemek23-Jan-13 7:41
memberPaulo Zemek23-Jan-13 7:41 
QuestionChange [EnableClientAccess(RequiresSecureEndpoint = true)] based on config Pin
UCLAdam20-Nov-12 23:34
memberUCLAdam20-Nov-12 23:34 
QuestionCommand Binding Pin
Andy_L_J19-Nov-12 11:51
memberAndy_L_J19-Nov-12 11:51 
AnswerRe: Command Binding Pin
SledgeHammer0119-Nov-12 12:14
memberSledgeHammer0119-Nov-12 12:14 
Dunno if you want these kinds of comments, so feel free to ignore them if you are offended Big Grin | :-D , but your question IS answered below.

1) Bad practice to litter your code with 'this'. It's not needed as its implied.
2) Bad practice to use an interface to reference a concrete class inside of the class itself (public ICommand LoadSomeViewCommand)... its a RelayCommand, not an ICommand. You should only pass it around externally as an ICommand.
3) Your implementation of RelayCommand isn't correct. You should not need all that new Action, new Predicate garbage.
4) Your non-generic RelayCommand should not take any params. RelayCommand<T> is the one that takes a param and that one should be type safe. Don't pass in an object, pass in the real type.
5) *THE ANSWER TO YOUR QUESTION* You can't databind to a variable. Only properties.
6) If you are using UnityContainer, or any other DI container. USE IT. In your SomeView contructor, you have the unity container reference, but aren't using it to create the object.
7) Better to use an attached property to set your data context, so you get rid of all the hand wiring with a code behind.
8) Stop using var's for simple types. This isn't JavaScript Smile | :) . Vars have specific uses, this isn't one of them.
GeneralRe: Command Binding Pin
Andy_L_J19-Nov-12 12:36
memberAndy_L_J19-Nov-12 12:36 
GeneralRe: Command Binding Pin
Mycroft Holmes19-Nov-12 12:51
memberMycroft Holmes19-Nov-12 12:51 
GeneralRe: Command Binding Pin
Andy_L_J19-Nov-12 13:14
memberAndy_L_J19-Nov-12 13:14 
GeneralRe: Command Binding Pin
Mycroft Holmes19-Nov-12 14:22
memberMycroft Holmes19-Nov-12 14:22 
GeneralRe: Command Binding Pin
SledgeHammer0119-Nov-12 13:14
memberSledgeHammer0119-Nov-12 13:14 
GeneralRe: Command Binding Pin
Mycroft Holmes19-Nov-12 14:26
memberMycroft Holmes19-Nov-12 14:26 
GeneralRe: Command Binding Pin
Wayne Gaylard20-Nov-12 4:29
mentorWayne Gaylard20-Nov-12 4:29 
GeneralRe: Command Binding Pin
SledgeHammer0120-Nov-12 7:42
memberSledgeHammer0120-Nov-12 7:42 
AnswerRe: Command Binding Pin
Pete O'Hanlon22-Nov-12 23:41
protectorPete O'Hanlon22-Nov-12 23:41 
GeneralRe: Command Binding Pin
Andy_L_J23-Nov-12 2:48
memberAndy_L_J23-Nov-12 2:48 
QuestionWPF Components For WinForm Pin
alirezamansoori13-Nov-12 6:26
memberalirezamansoori13-Nov-12 6:26 
AnswerRe: WPF Components For WinForm Pin
Pete O'Hanlon13-Nov-12 8:56
protectorPete O'Hanlon13-Nov-12 8:56 
AnswerRe: WPF Components For WinForm Pin
Abhinav S13-Nov-12 22:17
mvpAbhinav S13-Nov-12 22:17 
GeneralRe: WPF Components For WinForm Pin
alirezamansoori14-Nov-12 21:40
memberalirezamansoori14-Nov-12 21:40 
QuestionCan anyone suggest any good books or tutorials on WPF-MVVM please? Pin
Vijay Kanda11-Nov-12 20:22
memberVijay Kanda11-Nov-12 20:22 
AnswerRe: Can anyone suggest any good books or tutorials on WPF-MVVM please? Pin
Rags151213-Nov-12 8:22
memberRags151213-Nov-12 8:22 
GeneralRe: Can anyone suggest any good books or tutorials on WPF-MVVM please? Pin
Vijay Kanda13-Nov-12 22:56
memberVijay Kanda13-Nov-12 22:56 

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.


Advertise | Privacy | Mobile
Web01 | 2.8.170217.1 | Last Updated 17 Feb 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid