Exemple #1
0
        /// <summary>
        /// Applies current color scheme and layout properties to the bottom menu container used by the top-level file menu.
        /// This container usually contains Options and Exit buttons.
        /// Applies to Office 2007 style only.
        /// </summary>
        /// <param name="menuColumn">Container to apply style to.</param>
        public static void SetupMenuBottomContainer(ItemContainer bottomContainer)
        {
            Rendering.Office2007MenuColorTable mc = GetOffice2007MenuColorTable();
            if (mc == null)
                return;

            BackgroundColorBlend[] blend = new BackgroundColorBlend[mc.FileBottomContainerBackgroundBlend.Count];
            mc.FileBottomContainerBackgroundBlend.CopyTo(blend);
            bottomContainer.BackgroundStyle.BackColorBlend.Clear();
            bottomContainer.BackgroundStyle.BackColorBlend.AddRange(blend);

            bottomContainer.BackgroundStyle.BackColorGradientAngle = 90;
            bottomContainer.HorizontalItemAlignment = DevComponents.DotNetBar.eHorizontalItemsAlignment.Right;
        }
Exemple #2
0
        /// <summary>
        /// Applies current color scheme and layout settings to the container which acts as top-level file menu container.
        /// Applies to Office 2007 style only.
        /// </summary>
        /// <param name="container">Container to apply style to.</param>
        public static void SetupFileMenuContainer(ItemContainer topContainer)
        {
            Rendering.Office2007MenuColorTable mc = GetOffice2007MenuColorTable();
            if (mc == null)
                return;

            topContainer.LayoutOrientation = eOrientation.Vertical;
            topContainer.BackgroundStyle.PaddingBottom = 3;
            topContainer.BackgroundStyle.PaddingLeft = 3;
            topContainer.BackgroundStyle.PaddingRight = 3;
            topContainer.BackgroundStyle.PaddingTop = 8;
            BackgroundColorBlend[] blend = new BackgroundColorBlend[mc.FileBackgroundBlend.Count];
            mc.FileBackgroundBlend.CopyTo(blend);
            topContainer.BackgroundStyle.BackColorBlend.Clear();
            topContainer.BackgroundStyle.BackColorBlend.AddRange(blend);
        }