Click here to Skip to main content
15,917,059 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: hierachical menu Pin
Abhinav S6-Feb-12 4:40
Abhinav S6-Feb-12 4:40 
GeneralRe: hierachical menu Pin
arkiboys6-Feb-12 5:36
arkiboys6-Feb-12 5:36 
AnswerRe: hierachical menu Pin
Abhinav S6-Feb-12 5:55
Abhinav S6-Feb-12 5:55 
GeneralRe: hierachical menu Pin
arkiboys6-Feb-12 22:37
arkiboys6-Feb-12 22:37 
QuestionPlay DVD Pin
Alessio Elia6-Feb-12 3:52
Alessio Elia6-Feb-12 3:52 
AnswerRe: Play DVD Pin
Alisaunder10-Feb-12 1:10
Alisaunder10-Feb-12 1:10 
QuestionConditional DataBinding to UI Elements Pin
Andy_L_J4-Feb-12 12:40
Andy_L_J4-Feb-12 12:40 
AnswerRe: Conditional DataBinding to UI Elements Pin
SledgeHammer014-Feb-12 13:39
SledgeHammer014-Feb-12 13:39 
GeneralRe: Conditional DataBinding to UI Elements Pin
Andy_L_J4-Feb-12 15:18
Andy_L_J4-Feb-12 15:18 
GeneralRe: Conditional DataBinding to UI Elements Pin
SledgeHammer014-Feb-12 15:54
SledgeHammer014-Feb-12 15:54 
GeneralRe: Conditional DataBinding to UI Elements Pin
Andy_L_J4-Feb-12 17:42
Andy_L_J4-Feb-12 17:42 
AnswerRe: Conditional DataBinding to UI Elements Pin
Mycroft Holmes4-Feb-12 17:00
professionalMycroft Holmes4-Feb-12 17:00 
GeneralRe: Conditional DataBinding to UI Elements Pin
Andy_L_J4-Feb-12 17:48
Andy_L_J4-Feb-12 17:48 
GeneralRe: Conditional DataBinding to UI Elements Pin
Mycroft Holmes4-Feb-12 21:04
professionalMycroft Holmes4-Feb-12 21:04 
GeneralRe: Conditional DataBinding to UI Elements Pin
Andy_L_J4-Feb-12 22:05
Andy_L_J4-Feb-12 22:05 
GeneralRe: Conditional DataBinding to UI Elements Pin
Mycroft Holmes5-Feb-12 0:58
professionalMycroft Holmes5-Feb-12 0:58 
GeneralRe: Conditional DataBinding to UI Elements Pin
SledgeHammer015-Feb-12 7:53
SledgeHammer015-Feb-12 7:53 
GeneralRe: Conditional DataBinding to UI Elements Pin
Mycroft Holmes5-Feb-12 11:01
professionalMycroft Holmes5-Feb-12 11:01 
GeneralRe: Conditional DataBinding to UI Elements Pin
SledgeHammer015-Feb-12 11:49
SledgeHammer015-Feb-12 11:49 
GeneralRe: Conditional DataBinding to UI Elements Pin
Mycroft Holmes5-Feb-12 12:15
professionalMycroft Holmes5-Feb-12 12:15 
GeneralRe: Conditional DataBinding to UI Elements Pin
SledgeHammer015-Feb-12 12:26
SledgeHammer015-Feb-12 12:26 
Mycroft Holmes wrote:
I had in mind where the visible condition is based on the content of 1 or more
fields, not bools but string or numeric. Something that is really specific to
only that one view, I would still use code in the VM to evaluate the current
record!


That is what I showed in my more complex example. The multi-converter takes in 4 values and returns a decision based on those 4 values. I only showed you a small portion of that trigger, but there are actually 5 cases "1", "2", "3", "4", "5".

The problem with your solution is that you may leave holes where you update one of the values used in the calculation but forget the OnPropertyChanged("VisibilityForState1"); call.

I have done it your way in the past, but found that I didn't like having to put OnPropertyChanged() calls for 4 or 5 properties all over the place.

Also, I kind of believe that the VM should strictly be for communication between the V and M. Adding a bunch of properties to support the view couples them more closely then they should be.
GeneralRe: Conditional DataBinding to UI Elements Pin
Mycroft Holmes5-Feb-12 13:15
professionalMycroft Holmes5-Feb-12 13:15 
GeneralRe: Conditional DataBinding to UI Elements Pin
SledgeHammer015-Feb-12 14:14
SledgeHammer015-Feb-12 14:14 
GeneralRe: Conditional DataBinding to UI Elements Pin
Mycroft Holmes5-Feb-12 15:15
professionalMycroft Holmes5-Feb-12 15:15 
AnswerRe: Conditional DataBinding to UI Elements Pin
Mycroft Holmes5-Feb-12 15:16
professionalMycroft Holmes5-Feb-12 15:16 

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.