Ticket Q559751
Visible to All Users

Skin Gallery - How to change a skin icon (image) and name (caption)

created 11 years ago

Hi,

Unable to change name and ICON standard skin.

Regards,
Abdul Wafa

Answers approved by DevExpress Support

created 11 years ago (modified 11 years ago)

Hi Abdul,
To achieve your goal, find required GalleryItem in RibbonGalleryBarItem and set its Image, HoverImage and Caption properties. Check the following code:

Visual Basic
Public Sub New() InitializeComponent() SkinHelper.InitSkinGallery(ribbonGalleryBarItem1) Dim item As GalleryItem = FindGalleryItem("DevExpress Style") item.Image = _image item.HoverImage = _image item.Caption = "Custom caption" End Sub Private Function FindGalleryItem(ByVal text As String) As GalleryItem For Each group As GalleryItemGroup In ribbonGalleryBarItem1.Gallery.Groups For Each item As GalleryItem In group.Items If item.Caption = text Then Return item End If Next item Next group Return Nothing End Function

I hope you find this information useful. Let me know if you have additional questions.

    Show previous comments (3)
    Alisher (DevExpress Support) 11 years ago

      Hi,
      I've modified your project to meet your requirements. Please check it.
      Let me know if you have additional questions.

        Hi,
        Thanks Almost Done, but how to change icon if possible.
        Regards,
        Abdul Wafa

        Alisher (DevExpress Support) 11 years ago

          Hi,
          To change an icon, set the Item's Glyph property. Check the following code:

          Visual Basic
          '... skins.ItemLinks(0).Item.Glyph = %bitmap% '...

          Let me know if you have additional questions.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.