Click here to Skip to main content
16,015,697 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: DataGrid CellTemplate / CellEditingTemplate Pin
SledgeHammer017-Apr-11 14:05
SledgeHammer017-Apr-11 14:05 
AnswerRe: DataGrid CellTemplate / CellEditingTemplate Pin
Mycroft Holmes7-Apr-11 14:36
professionalMycroft Holmes7-Apr-11 14:36 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
eddieangel8-Apr-11 6:14
eddieangel8-Apr-11 6:14 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
SledgeHammer018-Apr-11 7:59
SledgeHammer018-Apr-11 7:59 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
eddieangel8-Apr-11 9:47
eddieangel8-Apr-11 9:47 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
SledgeHammer018-Apr-11 10:18
SledgeHammer018-Apr-11 10:18 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
eddieangel8-Apr-11 10:29
eddieangel8-Apr-11 10:29 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
SledgeHammer018-Apr-11 10:52
SledgeHammer018-Apr-11 10:52 
Ok, well, theres basically two main ways you can tell the WPF data binding engine that something has changed.

1) Dependency Properties (or DP for short - the whole DependencyProperty.Register... mumbo jumbo)
2) INotifyPropertyChanged (or INPC for short)

These two methods are independent of each other. A DP doesn't use INPC and vice versa. A DP has its own infrastructure to notify of updates. INPC requires you to implement the PropertyChanged event and manually send out notifications.

Convention dictates that DPs are typically only used in controls and ViewModels use INPC.

DPs typically have C# get/set wrappers. It is important that the ONLY code you have there are the GetValue() and SetValue() calls. Thats it. Not one thing more. Not a single thing Smile | :) . Thats because only your code calls the getter & setter. The WPF infrastructure bypasses those completely. You don't want the user call and WPF doing different things.

With IPNC, WPF will call your C# get/set methods, so its consistent there.

Heres a link on binding modes: http://msdn.microsoft.com/en-us/library/system.windows.data.bindingmode.aspx

What is "PropertyState" in your view model? Is that a DP or INPC?

I would think at the very least, you need to change to SelectedValue="{Binding PropertyState}" on the combo box. Not sure at all what "stateId" is all about.
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
eddieangel8-Apr-11 11:43
eddieangel8-Apr-11 11:43 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
SledgeHammer018-Apr-11 12:03
SledgeHammer018-Apr-11 12:03 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
eddieangel8-Apr-11 12:07
eddieangel8-Apr-11 12:07 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
SledgeHammer018-Apr-11 12:18
SledgeHammer018-Apr-11 12:18 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
eddieangel8-Apr-11 12:30
eddieangel8-Apr-11 12:30 
QuestionWhat Is A HitTest? Pin
Kevin Marois7-Apr-11 5:35
professionalKevin Marois7-Apr-11 5:35 
AnswerRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 6:27
mvePete O'Hanlon7-Apr-11 6:27 
GeneralRe: What Is A HitTest? Pin
Kevin Marois7-Apr-11 6:32
professionalKevin Marois7-Apr-11 6:32 
GeneralRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 6:38
mvePete O'Hanlon7-Apr-11 6:38 
GeneralRe: What Is A HitTest? Pin
Kevin Marois7-Apr-11 6:40
professionalKevin Marois7-Apr-11 6:40 
GeneralRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 6:51
mvePete O'Hanlon7-Apr-11 6:51 
GeneralRe: What Is A HitTest? Pin
Kevin Marois7-Apr-11 6:52
professionalKevin Marois7-Apr-11 6:52 
GeneralRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 8:29
mvePete O'Hanlon7-Apr-11 8:29 
GeneralRe: What Is A HitTest? Pin
Kevin Marois7-Apr-11 8:45
professionalKevin Marois7-Apr-11 8:45 
JokeRe: What Is A HitTest? Pin
Mycroft Holmes7-Apr-11 14:40
professionalMycroft Holmes7-Apr-11 14:40 
GeneralRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 21:51
mvePete O'Hanlon7-Apr-11 21:51 
GeneralRe: What Is A HitTest? Pin
Mycroft Holmes7-Apr-11 22:14
professionalMycroft Holmes7-Apr-11 22:14 

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.