ok, I got the several shapes in my custom FrameworkElement to allow for hit testing selection. Next comes the task of deselecting all shapes if the user clicks on a blank area. This doesn't work by default because the FrameworkElement doesn't fire a mousedown event if you click on a "blank" area.
Do people solve this by putting a background rectangle as the first drawingvisual in their frameworkelements (that will accept clicks, but will be treated differently than clicking on the foreground objects), or do they handle the "empty" mousedown events in the class that constructs the FrameworkElement (which in my case is a Viewmodel in an MVVM setup)? Or a third way I'm not considering?
thank you