void HandleControlClicked(UIMouseClickEventArgs args) { // Get the Text control acting as the Window's title var windowTitle = window.GetChild("WindowTitle", true) as Text; // Get control that was clicked UIElement clicked = args.Element; string name = "...?"; if (clicked != null) { // Get the name of the control that was clicked name = clicked.Name; } // Update the Window's title text windowTitle.Value = $"Hello {name}!"; }
private void UI_UIMouseClick(UIMouseClickEventArgs obj) { UIClicked = obj.Element != null; }