xaml - Detect which child control received a Pointer* event -
I have a container control that is controlling pointers and pointer moved events.
There is a set button in the container.
At the point of handling the incident, how can I decide which button is actually received?
mainpage.AddHandler (PointerPressedEvent, New PointerEventHandler (PointerPressedHandler, true); Private Zero PointerHandler (Object Sender, PointerUp Event Events E) {var p = e.GetCurrentPoint (null); // Perhaps situation information can be used? Var s = e.OriginalSource as the boundary; // The original source is a border, not a button, and I do not find the button from the border / todo - to determine which button was clicked} < P> This works:
Private Zero PointerHeadler (Object Sender, PointerUrited Event ARGS E) {var p = E GetCurrentPoint (zero); Var Element = VisualTriehler.Fund Elements Innhohost Coordinates (p. Post, main page, wrong); Button found Button; Foreign objects (various objects in elements) {foundButton = buttons in the form of objects; If (foundButton! = Null) {System.Diagnostics.Debug.WriteLine ("found button:" + foundButton.Name); }}}
Comments
Post a Comment