c# - Going more than one time through my AutoCompletBox Selection_Changed event -
i have autocompletebox, write name.
the probme is, i'm going through two(or more) times when choose 1 element in dropdownlist.
i don't understand why, going through populating event 1 time, why more in selection changed event more one?
<mycontrol:autocompletebox x:name="acpname" verticalalignment="top" horizontalalignment="left" istabstop="false" istextcompletionenabled="true" minimumprefixlength="3" valuememberbinding="{binding name}" itemtemplate="{staticresource itemtemplatematriculecandidat}" itemssource="{binding data, elementname=namesource}" text="{binding name, mode=twoway, notifyonvalidationerror=true, validatesonexceptions=true}" minwidth="150" filtermode="none" /> void acpname_selectionchanged(object sender, selectionchangedeventargs e) { try { emp itm = (emp)acpname.selecteditem; if (itm != null) { itmempselect.surname= itm.surname; itmempselect.id= itm.id; itmempselect.birth= itm.birth; } } catch (exception ex) { errorwindow.createnew(ex); } }
this happens if nothing in selection changed event. don't understand. seems hapenning when have multiple choice after populating event. why?
thank you.
Comments
Post a Comment