Click here to Skip to main content
15,896,118 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Change the display of a combobox control into hyperlink Pin
SledgeHammer018-Apr-11 7:57
SledgeHammer018-Apr-11 7:57 
QuestionDataGrid CellTemplate / CellEditingTemplate Pin
eddieangel7-Apr-11 9:31
eddieangel7-Apr-11 9:31 
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 
Ok, first of all, before I get into your question, I'm guessing you haven't worked with WPF too long or extensively? Pretty much *ALL* the WPF controls are dysfunctional and immature when compared to the WinForms and Win32 versions. You have to remember that WPF controls are built from scratch from the ground up, not built on top of other technologies. I'm working on the ListView control at the moment because I needed to implement a lot of the missing features that came for free with the WinForms/Win32/MFC versions. So far, I've written about 3000 lines of C# code and about 1000 lines of XAML. That code is *NOT* sprinkled with 10 page comments or crazy white space or anything like that. That is ~4000 lines of straight up code to implement all the missing features in the ListView control. I would only need about 25% of this code if I was using Winforms or Win32. It sucks, sure, but thats part of playing with WPF Smile | :) . I'm sure MSFT will bring the controls up to snuff in the next few versions of WPF as some of the controls are missing really big features.

Anyways, with that being said...

Your template does look a bit suspicious to me, unless I'm missing something:

* Seems like you normally show PropertyState.name in the TextBlock
* Seems like your ComboBox shows a list of PropertyStates, displaying the name property with a property called stateId indicating the selected item

So...

1) you might want to get rid of the UpdateSourceTrigger=PropertyChanged and add Mode=TwoWay just to make sure that is working as expected... in certain situations the default values are different then what you might expect.

2) the big problem I see here is that assuming you are writing the combobox selection to stateId correctly as two-way, how exactly is the "PropertyState" and/or "PropertyState.name" notification happening? There isn't anything in your XAML that would indicate PropertyState.name is getting a notification change. I would think the ComboBox should write the selection to PropertyState no?
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 
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 

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.