Do you know what I did wrong why I can't replace the whole button image (white circle around)? See the attached snapshot. I have tried many different image sizes with same result.
I tried 37x37 and 43x43 images of a circle, but had the same problems as dtjoa.
I fixed the problem by using a custom draw filter class. Set the UltratoolbarsManager.Ribbon.DrawFilter to an instance of this AppButtonFilter, and add the desired image for your logo in the Resources (or supply it some other way)
<code lang="vb.net">
Public Class AppButtonFilter Implements Infragistics.Win.IUIElementDrawFilter Public Function GetPhasesToFilter(ByRef drawParams As Infragistics.Win.UIElementDrawParams) _ As Infragistics.Win.DrawPhase _ Implements(Infragistics.Win.IUIElementDrawFilter.GetPhasesToFilter) If (TypeOf (drawParams.Element) Is ApplicationMenuButtonUIElement) Then Return Infragistics.Win.DrawPhase.BeforeDrawImage Else Return Infragistics.Win.DrawPhase.None End If End Function Public Function DrawElement(ByVal drawPhase As Infragistics.Win.DrawPhase, _ ByRef drawParams As Infragistics.Win.UIElementDrawParams) As Boolean _ Implements Infragistics.Win.IUIElementDrawFilter.DrawElement Dim elementRect As Rectangle = drawParams.Element.Rect elementRect.Inflate(-1, -1) drawParams.DrawImage(Resources.RedCircleImage, elementRect, True, Nothing) End Function End Class
</code>
Here are the results:
using ApplicationMenuButtonImage:
using the Draw Filter:
This looks like it may be a bug then. I have forwarded this post to the Developer Support Manager and a DS engineer will be contacting you about this issue.
There is definetly a bug with ApplicationMenu Image. I had take the DrawFilter approach.