Пример #1
0
        /// <summary>
        /// Converts a smart part information to a compatible one for the workspace.
        /// </summary>
        protected virtual XtraNavBarGroupSmartPartInfo OnConvertFrom(ISmartPartInfo source)
        {
            XtraNavBarGroupSmartPartInfo spi = SmartPartInfo.ConvertTo <XtraNavBarGroupSmartPartInfo>(source);

            if (source is XtraImageSmartPartInfo)
            {
                XtraImageSmartPartInfo imageSmartPartInfo = (XtraImageSmartPartInfo)source;
                spi.SmallImage = imageSmartPartInfo.SmallImage;
                spi.LargeImage = imageSmartPartInfo.LargeImage;
            }

            return(spi);
        }
Пример #2
0
        private static void ApplySmartPartInfoHelper(NavBarGroup group, XtraImageSmartPartInfo smartPartInfo)
        {
            group.Caption = smartPartInfo.Title;
            group.Hint    = smartPartInfo.Description;

            if (smartPartInfo.SmallImage != null)
            {
                group.SmallImage = smartPartInfo.SmallImage;
            }

            if (smartPartInfo.LargeImage != null)
            {
                group.LargeImage           = smartPartInfo.LargeImage;
                group.GroupCaptionUseImage = NavBarImage.Large;
            }
        }