Beispiel #1
0
        private static Office2007CheckBoxColorTable GetCheckBoxItem(ColorFactory factory, MetroPartColors metroColors)
        {
            Office2007CheckBoxColorTable chk = new Office2007CheckBoxColorTable();

            chk.Default.CheckBackground = new LinearGradientColorTable(factory.GetColor(metroColors.CanvasColor), Color.Empty);
            chk.Default.CheckBorder = factory.GetColor(metroColors.TextDisabledColor);
            chk.Default.CheckInnerBackground = new LinearGradientColorTable(factory.GetColor(metroColors.CanvasColor));
            chk.Default.CheckInnerBorder = factory.GetColor(metroColors.CanvasColor);
            chk.Default.CheckSign = new LinearGradientColorTable(factory.GetColor(metroColors.TextLightColor), Color.Empty);
            chk.Default.Text = factory.GetColor(metroColors.TextColor);

            chk.MouseOver.CheckBackground = new LinearGradientColorTable(factory.GetColor(metroColors.BaseColorLightest), Color.Empty);
            chk.MouseOver.CheckBorder = factory.GetColor(metroColors.BaseColorLight);
            chk.MouseOver.CheckInnerBackground = new LinearGradientColorTable(factory.GetColor(metroColors.BaseColorLightest));
            chk.MouseOver.CheckInnerBorder = factory.GetColor(metroColors.BaseColorLightest);
            chk.MouseOver.CheckSign = new LinearGradientColorTable(factory.GetColor(metroColors.TextColor), Color.Empty);
            chk.MouseOver.Text = factory.GetColor(metroColors.TextColor);

            chk.Pressed.CheckBackground = new LinearGradientColorTable(factory.GetColor(metroColors.BaseColorLight));
            chk.Pressed.CheckBorder = factory.GetColor(metroColors.BaseColorLight);
            chk.Pressed.CheckInnerBackground = new LinearGradientColorTable(factory.GetColor(metroColors.BaseColorLight));
            chk.Pressed.CheckInnerBorder = factory.GetColor(metroColors.BaseColorLight);
            chk.Pressed.CheckSign = new LinearGradientColorTable(factory.GetColor(metroColors.TextColor), Color.Empty);
            chk.Pressed.Text = factory.GetColor(metroColors.TextColor);

            chk.Disabled.CheckBackground = new LinearGradientColorTable(factory.GetColor(metroColors.CanvasColor), Color.Empty);
            chk.Disabled.CheckBorder = factory.GetColor(metroColors.CanvasColorLightShade);
            chk.Disabled.CheckInnerBackground = new LinearGradientColorTable(factory.GetColor(metroColors.CanvasColor));
            chk.Disabled.CheckInnerBorder = Color.Empty; // factory.GetColor(metroColors.CanvasColorLightShade);
            chk.Disabled.CheckSign = new LinearGradientColorTable(factory.GetColor(metroColors.CanvasColorDarkShade), Color.Empty);
            chk.Disabled.Text = factory.GetColor(metroColors.CanvasColorDarkShade);

            return chk;
        }
Beispiel #2
0
        private Office2007CheckBoxColorTable GetCheckBoxColorTable()
        {
            if (m_CheckBoxColorTable == null)
            {
                Office2007Renderer r = this.GetRenderer() as Office2007Renderer;
                if (r != null)
                {
                    m_CheckBoxColorTable = r.ColorTable.CheckBoxItem;
                }
            }

            return m_CheckBoxColorTable;
        }