Home>
When there is an object with each event (button1 and button2, CanvasControl), if the topmost object (CanvasControl) is almost transparent (Background = "# 01FFFFFF"), Button1 or Button2 and CanvasControl What if I want to trigger both mouse events at the same time?
In the following cases, only the CanvasControl event occurs and the Button1 and Button2 events below it do not occur.
I do n’t even see the direction and I ’m worried.
<Window x: Class = "WpfObjectAutoMake01.MainWindow"
xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml"
xmlns: d = "http://schemas.microsoft.com/expression/blend/2008"
xmlns: mc = "http://schemas.openxmlformats.org/markup-compatibility/2006"
mc: Ignorable = "d"
Title = "MainWindow" Height = "450" Width = "800">
<Grid>
<Button x: Name = "button1" Content = "Button" HorizontalAlignment = "Left" Margin = "34,27,0,0" VerticalAlignment = "Top" Width = "75" Click = "button1_Click" />
<Button x: Name = "button2" Content = "Button" HorizontalAlignment = "Left" Margin = "134,27,0,0" VerticalAlignment = "Top" Width = "75" Click = "button2_Click" />
<Canvas Name = "CanvasControl" Background = "# 01FFFFFF" MouseDown = "CanvasControl_MouseDown" />
</Grid>
</Window>
Added November 27, 2019
Fixed the button position overlapping
-
Answer # 1
Related articles
- c # - unity: functions of other objects cannot be executed and "cs0120" is displayed
- c # - can't give commands to objects created with instantiate
- c # - get the text of the textbox dynamically using an event handler
- c # - can't drag and drop objects into unity serialize field
- c # - how to fix the order of unity child objects
- c # - [unity] how to arrange objects in datetime order of child objects
- c # - in unity, addforce for multiple objects is stopped at the same position, but there are some variations
- c # - inversion of 2d object's mesh collider
- c # - i want to modify what is used as a database by putting data in objects in unity
- c # - about moving objects in unity
- how can i move multiple objects with unity c #?
- c # - retrieve objects of other scripts
- internal processing when calling c # event handler
- deserializing nested objects returns null (newtonsoftjson c #)
- how to generate an event from an external device connected to usb with c #
- c # - determine if there are any objects in the unity area
- c # - i want to place objects in a counterclockwise circle
- c # - create objects statically at the editor stage
- c # - unable to get other objects with unity script
- c # - script to count objects in a range
Related questions
- c # - i want to change the background color and text color of any day with the wpf calendar control
- [c #] i want to acquire the microphone volume in real time with naudio
- c # - how to specify the argument systemwindowsuielement as a string
- c # - i want to specify the event when the enter key is pressed in the textbox in the mvvm of wpf + livet
- c # - i want to display an image set in a two-dimensional array with wpf
- c # - i want to disable button when textbox is blank in reactiveproperty
- c # - read excell in thread
- c # - i can't bind using relativesource when i put contextmenu in between
- c # - it is displayed so that the window overlaps with webbrowser,
- c # - wpf listview checkbox i want to control the active state
I want an event with or without buttons.
What about
PreviewMouseDown
? It is difficult to come before Click.