Click here to Skip to main content
15,897,891 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Silverlight slider - binding lost when value is out-of-range Pin
killabyte29-Sep-11 17:23
killabyte29-Sep-11 17:23 
GeneralRe: Silverlight slider - binding lost when value is out-of-range Pin
BobJanova30-Sep-11 4:45
BobJanova30-Sep-11 4:45 
GeneralRe: Silverlight slider - binding lost when value is out-of-range Pin
Wjousts30-Sep-11 10:08
Wjousts30-Sep-11 10:08 
GeneralRe: Silverlight slider - binding lost when value is out-of-range Pin
Wjousts30-Sep-11 9:55
Wjousts30-Sep-11 9:55 
QuestionWPF combobox selecteditem issue Pin
PretzelB29-Sep-11 5:34
PretzelB29-Sep-11 5:34 
AnswerRe: WPF combobox selecteditem issue Pin
Ian Shlasko29-Sep-11 5:57
Ian Shlasko29-Sep-11 5:57 
GeneralRe: WPF combobox selecteditem issue Pin
PretzelB29-Sep-11 6:19
PretzelB29-Sep-11 6:19 
GeneralRe: WPF combobox selecteditem issue Pin
Ian Shlasko29-Sep-11 8:43
Ian Shlasko29-Sep-11 8:43 
Ah, Simon nailed the problem...

The category being dumped into "mySelectedCategory" isn't IN the list. It's an object created in GetMyCategory() that has the same values as one of the items in the list.

So the solution is to override the Equals() function of the category, so it returns true when the ID and Name match (Or just the ID). You'll also be told to override GetHashCode (Also a good idea)...

That way, the data binding system will be able to match "mySelectedCategory" to an item in the list, and select it for you.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)

GeneralRe: WPF combobox selecteditem issue Pin
PretzelB29-Sep-11 9:31
PretzelB29-Sep-11 9:31 
GeneralRe: WPF combobox selecteditem issue Pin
Ian Shlasko29-Sep-11 10:32
Ian Shlasko29-Sep-11 10:32 
AnswerRe: WPF combobox selecteditem issue Pin
Simon Bang Terkildsen29-Sep-11 8:07
Simon Bang Terkildsen29-Sep-11 8:07 
GeneralRe: WPF combobox selecteditem issue Pin
PretzelB29-Sep-11 9:27
PretzelB29-Sep-11 9:27 
QuestionHow to use WPF to implement multi-pen drawing? Pin
rehuo28-Sep-11 21:58
rehuo28-Sep-11 21:58 
AnswerRe: How to use WPF to implement multi-pen drawing? Pin
rehuo5-Oct-11 20:02
rehuo5-Oct-11 20:02 
QuestionHow to get WM_Gesture messages in WPF4.0 touch aware application? Pin
manil kumar28-Sep-11 21:15
manil kumar28-Sep-11 21:15 
QuestionListBox Binding Pin
Samir.Sh28-Sep-11 20:46
Samir.Sh28-Sep-11 20:46 
GeneralRe: ListBox Binding Pin
Samir.Sh29-Sep-11 20:16
Samir.Sh29-Sep-11 20:16 
QuestionObsolete Examples Pin
michaelbarb28-Sep-11 8:53
michaelbarb28-Sep-11 8:53 
AnswerRe: Obsolete Examples Pin
AnnieMacD28-Sep-11 10:05
AnnieMacD28-Sep-11 10:05 
GeneralRe: Obsolete Examples Pin
michaelbarb28-Sep-11 10:21
michaelbarb28-Sep-11 10:21 
GeneralRe: Obsolete Examples Pin
SledgeHammer0128-Sep-11 10:46
SledgeHammer0128-Sep-11 10:46 
GeneralRe: Obsolete Examples Pin
michaelbarb29-Sep-11 8:13
michaelbarb29-Sep-11 8:13 
GeneralRe: Obsolete Examples Pin
SledgeHammer0129-Sep-11 8:40
SledgeHammer0129-Sep-11 8:40 
GeneralRe: Obsolete Examples Pin
michaelbarb29-Sep-11 8:50
michaelbarb29-Sep-11 8:50 
GeneralRe: Obsolete Examples Pin
SledgeHammer0129-Sep-11 10:08
SledgeHammer0129-Sep-11 10:08 

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.