Jan 20, 2014 at 9:33 PM
Edited Jan 21, 2014 at 5:57 PM
scenario? It involved a search function. Now that the deadlock is fixed, I'm trying to figure out how to address another issue: excessive refreshing. Currently, the search repeats every time anything changes that the search results might depend
on (whether the dependency is real or merely a potential dependency.)
This causes hiccups in the user interface because the ListBoxes that show the search results are reset (scroll to the top) whenever the search repeats; this thwarts the user's efforts to scroll down the list of search results ([edited]
was able to fix most of this behavior by changing how I defined
on the VMs... I originally thought that the complexity of my search screen, which is a list of lists of search results somewhat like the Start Menu search in Windows 7, might have been a factor, but evidently it is not.</strike>
My first edit was wrong, because when the "resetting" stopped I failed to notice that search was fundamentally broken; when the search text changed, the search results did not! Clearly I do not fully understand how updates
work. [edit 3]
I suspect my original guess was right after all; if
in the 'outer' VM
(which contains a list of inner VMs) returns false, the inner list resets and annoys the user, but if
returns true, the inner list is not updated at all... it doesn't matter if I use
. in the former case I think the UC
keeps the old VM with the old search results rather than the new VM with the new search results, while in the latter case, similar behavior can be ascribed to the outer
rather than Update Controls.).
It seems to me that the simplest solution would be to block the formation of certain dependencies. For example,
, let's say) should behave like it depends only on the search string and whether the search Popup is open (because searching is done on a Popup window), even though it must read many
other Independents in the course of performing the search. That way, search results are not refreshed without user action. So in the Update method for
I would like to turn off dependency tracking while I perform some of the work.
However, I don't see any way to block dependency formation. What do you think, is dependency blocking a feature that Update Controls should have? Without the "resetting" behavior it's no big deal, but it still seems like it would be nice to have.
For instance, some might argue that the search results should be "stable", not changing while the user is reviewing them. Often as a software developer you get "little" feature requests which turn out to be "big" feature requests
if the underlying technology (in this case Update Controls) isn't designed to work that way.