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
165
Adding an image to a button in the caption of a DockableControlPane
posted

I'm trying to add a button with an image  to the caption area of a DockableControlPane. So in addition to the standard Minimize, Maximize, and Close buttons I'm going to have a Refresh button.

I'm using a CreationFilter to add my ButtonUIElement-derived 'RefreshButtonUIElement' to the caption area, and that works fine.

I'm also using the CreationFilter to add a ImageUIElement to my RefreshButtonUIElement to display the image. That does not work. The button appears in the caption area, but is blank.

I've tried override RefreshButtonUIElement.InitAppearance() to add the image there, but that does not work. The button appears in the caption, but is blank.

How can I get an image to appear in the button I've added? I've been following the information I found at this post, but now I'm stuck:

http://community.infragistics.com/forums/p/18052/65631.aspx

Thanks,

jb

 

Parents
No Data
Reply
  • 44743
    posted

    You can do this without adding another element into your custom element. Override DrawImage on your custom element and try drawing your image with the DrawImage method on the drawParams parameter.

Children
No Data