■ RibbonGalleryBarItem 클래스 : 특정 스킨 숨기기 예제

------------------------------------------------------------------------------------------------------------------------

HideSkin(this.skinRibbonGalleryBarItem, "DevExpress Style");

------------------------------------------------------------------------------------------------------------------------

 

■ RibbonGalleryBarItem 클래스 : 특정 스킨 숨기기

------------------------------------------------------------------------------------------------------------------------

using DevExpress.XtraBars;

using DevExpress.XtraBars.Ribbon;

 

#region 스킨 숨기기 - HideSkin(ribbonGalleryBarItem, skinNameArray)

 

/// <summary>

/// 스킨 숨기기

/// </summary>

/// <param name="ribbonGalleryBarItem">리본 갤러리 바 항목</param>

/// <param name="skinNameArray">스킨명 배열</param>

public void HideSkin(RibbonGalleryBarItem ribbonGalleryBarItem, params string[] skinNameArray)

{

    for(int i = 0; i < ribbonGalleryBarItem.Gallery.Groups.Count; i++)

    {

        GalleryItemGroup group = ribbonGalleryBarItem.Gallery.Groups[i];

 

        if(group == null)

        {

            continue;

        }

 

        for(int j = 0; j < group.Items.Count; j++)

        {

            GalleryItem item = group.Items[j];

 

            if(item == null)

            {

                continue;

            }

 

            foreach(string skinName in skinNameArray)

            {

                if(item.Caption.Contains(skinName))

                {

                    item.Visible = false;

                }

            }

        }

    }

}

 

#endregion

------------------------------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요