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

WPF

 
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 
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 
In a previous version I had tried that but it appears I coded it incorrectly. For some reason I tried to implement IEqualityComparer and when I did nothing changed. Instead I tried an override to Equals and it seems to have worked.

Sigh. I had the answer from a Google search a while back, I just implemented it incorrectly.

Here's what I coded that appears to have worked.

Public Overrides Function Equals(obj As Object) As Boolean
    If IsNothing(obj) OrElse Not [GetType]().Equals(obj.GetType()) Then
        Return False
    End If
    Dim myc As myCategory = CType(obj, myCategory)
    Return CategoryID = myc.CategoryID
End Function
Public Overrides Function GetHashCode() As Integer
    Return CategoryID.GetHashCode ^ CategoryName.GetHashCode
End Function

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 
GeneralRe: Obsolete Examples Pin
michaelbarb29-Sep-11 10:48
michaelbarb29-Sep-11 10:48 
GeneralRe: Obsolete Examples Pin
SledgeHammer0129-Sep-11 12:20
SledgeHammer0129-Sep-11 12:20 
GeneralRe: Obsolete Examples Pin
michaelbarb30-Sep-11 2:22
michaelbarb30-Sep-11 2:22 
GeneralRe: Obsolete Examples Pin
Pete O'Hanlon29-Sep-11 21:58
mvePete O'Hanlon29-Sep-11 21:58 

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.