Hi all,
Got my search using SearchBar and SearchCommandParameter working, all tested manually and working the way one would expect. :-) Then I tried using a USB handheld barcode scanner (which is the ultimate aim), and the entry (which has focus) updates as one would expect, however this did trigger a search without me pressing enter or the search icon (i.e. the SearchBar's SearchCommand event was triggered), and although that in itself could be a good thing (auto search when you scan something) the problem is that the SearchCommandParameter wasn't updated, so it was duplicating the last search I made... or doing a search with null if I'd pressed clear after the previous search.
Now, I never wrote any code myself around SearchCommandParameter (other than binding it to Text box) - that was part of the magic of using SearchBar that you can get the parameter passed automatically - so there isn't any code I can look at or change. Have I discovered a bug here? (I tried Googling "SearchCommand event triggered but SearchCommandParameter not updated", and didn't see anything similar - most results were about the event NOT being triggered) Or maybe there's a timing issue here? (works fine with manual entries though, and given the parameter is automatically passed when the event is triggered I'm not sure how you could fix that)
I want either...
1. event triggers automatically with updated SearchCommandParameter
2. event has to be triggered manually exclusively
At the moment all I can get is it being triggered automatically with the old parameter (or trigger manually to run a second time with updated parameter).
thanks,
Donald.
P.S. this is on UWP (haven't tried other platforms yet)