■ RibbonGalleryBarItem 클래스 : 스킨 그룹핑 제거하기 예제

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

RemoveSkinGrouping(this.skinRibbonGalleryBarItem);

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

 

■ RibbonGalleryBarItem 클래스 : 스킨 그룹핑 제거하기

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

using System.Linq;

 

using DevExpress.XtraBars;

using DevExpress.XtraBars.Ribbon;

 

#region 스킨 그룹핑 제거하기 - RemoveSkinGrouping(ribbonGalleryBarItem)

 

/// <summary>

/// 스킨 그룹핑 제거하기

/// </summary>

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

public void RemoveSkinGrouping(RibbonGalleryBarItem ribbonGalleryBarItem)

{

    GalleryItemGroup group = new GalleryItemGroup() { Caption = "Available Skins" };

 

    ribbonGalleryBarItem.Gallery.Groups.Insert(0, group);

 

    foreach(GalleryItem item in ribbonGalleryBarItem.Gallery.GetAllItems())

    {

        ribbonGalleryBarItem.Gallery.Groups[0].Items.Add(item);

    }

 

    while(ribbonGalleryBarItem.Gallery.Groups.Count > 1)

    {

        ribbonGalleryBarItem.Gallery.Groups.Remove(ribbonGalleryBarItem.Gallery.Groups.Last());

    }

}

 

#endregion

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

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요