Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1180
row with a control container to identify click
posted

I have the grid (see image below) where the entire line is composed of a UserControl (plus handling class) with controlContainer.

It turns out that we must identify the click on the images to perform certain actions as well as a button,

How do I do this?

 

 

Parents
  • 69832
    Offline posted

    The UltraControlContainerEditor does not know anything about the individual components of your UserControl, so there is no way to use the editor to hit test for the things contained therein. What you would need to do is add hit testing functionality to your control, so that you can pass in a coordinate pair and get some piece of information that describes what part of the control lies at that point. Then you need to handle the grid's MouseDown (or MouseClick) event, and use the UIElement hit testing methods to get a reference to the UIElement that was clicked, so you can determine the relative offset from the element's top left corner. Once you have that you know the relative point that was clicked, and then you can pass that to your UserControl's hit testing method to get the component that was clicked.

Reply Children
No Data