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
790
Path from EditorButton object to EditorButtonUIElement
posted

Does anyone know what is the easiest way to get from an EditorButton object to the associated EditorButtonUIElement?

Parents
  • 469350
    Suggested Answer
    Offline posted

    I don't think you can get the UIElement from a single button instance. The button object may be represented by more than one UIElement. If the button is in a grid cell, for example, it will show up with a different UIElement in each cell.

    If you are just using the editor control, where there is only a single instance, then you could get the element from the control using control.UIElement.GetDescendant and passing in the button as context.

    But this seems like a really odd thing to do. You cannot modify the UIElement in this way... so why are you trying to get it? What are you trying to do?

Reply Children