Click here to Skip to main content
       

Silverlight / WPF

 
GeneralRe: FlowDocument - different coloured text in a word PinmemberRugbyLeague30-Nov-12 8:48 
GeneralRe: FlowDocument - different coloured text in a word PinmemberRugbyLeague30-Nov-12 8:49 
QuestionGrid.ColumnDefinition.setvalue Pinmembercaradri28-Nov-12 3:06 
AnswerRe: Grid.ColumnDefinition.setvalue PinmemberMatt T Heffron28-Nov-12 9:05 
GeneralRe: Grid.ColumnDefinition.setvalue Pinmembercaradri28-Nov-12 20:12 
QuestionGrid Pinmemberehsan ebne ali28-Nov-12 0:01 
QuestionSet Backgroundcolor when CheckBox in TreeView is checked PinmemberMember 963452827-Nov-12 23:43 
QuestionWPF Grid Splitter Problem PinmemberKevin Marois27-Nov-12 16:27 
QuestionWPF Dispatch.Invoke/BeginInvoke deadlock? [modified] Pinmemberdevvvy26-Nov-12 19:30 
Answer[SOLN FOUND] - it is NOT that Dispatcher.Invoke buggy! [modified] Pinmemberdevvvy29-Nov-12 14:15 
GeneralRe: [SOLN FOUND] - it is NOT that Dispatcher.Invoke buggy! PinmemberPaulo Zemek23-Jan-13 6:41 
QuestionChange [EnableClientAccess(RequiresSecureEndpoint = true)] based on config PinmemberUCLAdam20-Nov-12 22:34 
QuestionCommand Binding PinmemberAndy_L_J19-Nov-12 10:51 
AnswerRe: Command Binding PinmemberSledgeHammer0119-Nov-12 11: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 PinmemberAndy_L_J19-Nov-12 11:36 
GeneralRe: Command Binding PinmemberMycroft Holmes19-Nov-12 11:51 
GeneralRe: Command Binding PinmemberAndy_L_J19-Nov-12 12:14 
GeneralRe: Command Binding PinmemberMycroft Holmes19-Nov-12 13:22 
GeneralRe: Command Binding PinmemberSledgeHammer0119-Nov-12 12:14 
GeneralRe: Command Binding PinmemberMycroft Holmes19-Nov-12 13:26 
GeneralRe: Command Binding PinmentorWayne Gaylard20-Nov-12 3:29 
GeneralRe: Command Binding PinmemberSledgeHammer0120-Nov-12 6:42 
AnswerRe: Command Binding PinprotectorPete O'Hanlon22-Nov-12 22:41 
GeneralRe: Command Binding PinmemberAndy_L_J23-Nov-12 1:48 
QuestionWPF Components For WinForm Pinmemberalirezamansoori13-Nov-12 5:26 
AnswerRe: WPF Components For WinForm PinprotectorPete O'Hanlon13-Nov-12 7:56 
AnswerRe: WPF Components For WinForm PinmvpAbhinav S13-Nov-12 21:17 
GeneralRe: WPF Components For WinForm Pinmemberalirezamansoori14-Nov-12 20:40 
QuestionCan anyone suggest any good books or tutorials on WPF-MVVM please? PinmemberVijay Kanda11-Nov-12 19:22 
AnswerRe: Can anyone suggest any good books or tutorials on WPF-MVVM please? PinmemberRags151213-Nov-12 7:22 
GeneralRe: Can anyone suggest any good books or tutorials on WPF-MVVM please? PinmemberVijay Kanda13-Nov-12 21:56 
AnswerRe: Can anyone suggest any good books or tutorials on WPF-MVVM please? PinmvpAbhinav S13-Nov-12 21:19 
GeneralRe: Can anyone suggest any good books or tutorials on WPF-MVVM please? PinmemberVijay Kanda13-Nov-12 21:59 
GeneralRe: Can anyone suggest any good books or tutorials on WPF-MVVM please? PinmvpAbhinav S13-Nov-12 23:09 
QuestionDatabinding ICollectionView to DataGrid WPF C# [modified] Pinmembermaycockt8-Nov-12 5:57 
AnswerRe: Databinding ICollectionView to DataGrid WPF C# Pinmembermaycockt8-Nov-12 22:42 
QuestionPrinting with more than 96 dpi in WPF [modified] PinmemberMember 45210688-Nov-12 2:22 
AnswerRe: Printing with more than 96 dpi in WPF PinmemberSuper Lloyd14-Nov-12 16:16 
GeneralRe: Printing with more than 96 dpi in WPF [modified] PinmemberMember 452106819-Nov-12 22:26 
QuestionI have issues with the C# WPF WebBrowser class PinmemberXarzu6-Nov-12 20:14 
AnswerRe: I have issues with the C# WPF WebBrowser class PinmemberGerry Schmitz7-Nov-12 11:04 
QuestionBlurry Borderline In FlowDocument PinmemberFocusedWolf6-Nov-12 10:46 
AnswerRe: Blurry Borderline In FlowDocument PinmemberGerry Schmitz7-Nov-12 13:13 
AnswerRe: Blurry Borderline In FlowDocument [modified] PinmemberFocusedWolf7-Nov-12 16:00 
QuestionBinding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 8:16 
AnswerRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 8:29 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 8:54 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 9:00 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 9:22 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 9:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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.140814.1 | Last Updated 20 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid