private Images GetImages()
        {
            Skin        skin = EditorsSkins.GetSkin(DevExpress.LookAndFeel.UserLookAndFeel.Default.ActiveLookAndFeel);
            SkinElement elem = skin[EditorsSkins.SkinCheckBox];

            return(elem.Image.GetImages().Images);
        }
        private static SkinElement GetSkinElement()
        {
            Skin        skin        = EditorsSkins.GetSkin(DevExpress.LookAndFeel.UserLookAndFeel.Default);
            SkinElement skinElement = skin["CheckBox"];

            return(skinElement);
        }
コード例 #3
0
        protected void DrawBody(ControlGraphicsInfoArgs info)
        {
            Rectangle bound       = (info.ViewInfo as ToggleSwitchViewInfo).BodyRectangle;
            Skin      currentSkin = EditorsSkins.GetSkin((info.ViewInfo as ToggleSwitchViewInfo).LookAndFeel);
            Rectangle bodyRect    = (info.ViewInfo as ToggleSwitchViewInfo).BodyRectangle;

            bodyRect.Inflate(-3, -3);
            currentSkin = CommonSkins.GetSkin((info.ViewInfo as ToggleSwitchViewInfo).LookAndFeel);
            SkinElement element     = currentSkin[CommonSkins.SkinTextBorder];
            Color       borderColor = element.Border.Top;

            info.Cache.FillRectangle(info.Cache.GetSolidBrush(DevExpress.LookAndFeel.LookAndFeelHelper.GetSystemColorEx((info.ViewInfo as ToggleSwitchViewInfo).LookAndFeel,
                                                                                                                        SystemColors.Control)), info.Bounds);
            Color skinBackColor = currentSkin.CommonSkin.Colors["Control"];

            if ((info.ViewInfo as ToggleSwitchViewInfo).BodyState == DevExpress.Utils.Drawing.ObjectState.Hot)
            {
                using (SolidBrush sb = new SolidBrush(ConvertColor(skinBackColor, 100))) {
                    info.Graphics.FillRectangle(sb, bodyRect);
                }
            }

            bound.Width--;
            bound.Height--;
            info.Graphics.DrawRectangle(new Pen(borderColor), bound);
        }
コード例 #4
0
        public static ImageCollection GetComboImages()
        {
            Skin        currentSkin = EditorsSkins.GetSkin(UserLookAndFeel.Default.ActiveLookAndFeel);
            SkinElement element     = currentSkin[EditorsSkins.SkinSpinDown];

            return(element.Image.GetImages());
        }
コード例 #5
0
        protected virtual SkinElement GetCheckBoxImages()
        {
            Skin        skin        = EditorsSkins.GetSkin(DevExpress.LookAndFeel.UserLookAndFeel.Default);
            SkinElement skinElement = skin["CheckBox"];

            if (skinElement == null)
            {
                return(null);
            }
            return(skinElement);
        }
コード例 #6
0
        protected override void DrawButton(ButtonEditViewInfo viewInfo, EditorButtonObjectInfoArgs info)
        {
            if (info.Bounds.Width == 0 || viewInfo.RightButtons.Count == 0)
            {
                return;
            }
            if (info.Button.Index == 1)
            {
                base.DrawButton(viewInfo, info);
                string str_value    = viewInfo.EditValue as string;
                Color  captionColor = EditorsSkins.GetSkin(viewInfo.LookAndFeel.ActiveLookAndFeel)[EditorsSkins.SkinEditorButton].Color.GetForeColor();
                info.Cache.DrawString(str_value, viewInfo.Appearance.Font, new SolidBrush(captionColor), info.Bounds, info.Appearance.GetStringFormat());
                return;
            }

            base.DrawButton(viewInfo, info);
        }
コード例 #7
0
        protected override void DrawButton(ButtonEditViewInfo viewInfo, EditorButtonObjectInfoArgs info)
        {
            base.DrawButton(viewInfo, info);
            TagListViewInfo         vi = viewInfo as TagListViewInfo;
            Rectangle               closeButtonRect      = TagListViewInfo.GetCloseRectangle(info.Bounds);
            SkinEditorButtonPainter currentButtonPainter = (SkinEditorButtonPainter)viewInfo.GetButtonPainter(info);
            Skin        currentSkin = EditorsSkins.GetSkin(currentButtonPainter.Provider);
            SkinElement closeButton = currentSkin[EditorsSkins.SkinCloseButton];
            CustomSkinElementPainter customSkinElementPainter = new CustomSkinElementPainter();

            if (closeButton != null)
            {
                SkinElementInfo skinInfo = new SkinElementInfo(EditorsSkins.GetSkin(currentButtonPainter.Provider)[EditorsSkins.SkinCloseButton], closeButtonRect);
                skinInfo.Cache = info.Cache;
                skinInfo.State = info.State;
                customSkinElementPainter.DrawObject(skinInfo);
            }
        }
コード例 #8
0
        internal void InitializeAppearance()
        {
            Color foreColor = Color.Empty;

            if (this.LookAndFeel.ActiveStyle == ActiveLookAndFeelStyle.Skin)
            {
                Skin skin = EditorsSkins.GetSkin(this.LookAndFeel);
                if (skin != null)
                {
                    foreColor = skin.Colors.GetColor(EditorsSkins.SkinHyperlinkTextColor);
                }
            }
            if (foreColor.IsEmpty)
            {
                foreColor = Color.Blue;
            }
            this.Appearance.ForeColor = foreColor;
            this.Appearance.Font      = new Font(this.Appearance.Font, FontStyle.Underline);
        }