示例#1
0
 private void DrawCheckBox(int x, int y, string skinName, CheckState state, CheckStyles style,
                           SkinCheckObjectPainter painter, CheckObjectInfoArgs args)
 {
     ((UserLookAndFeel)painter.Provider).SkinName = skinName;
     args.Bounds = new Rectangle(x, y, 0, 0);
     painter.CalcObjectBounds(args);
     args.CheckState = state;
     args.CheckStyle = style;
     painter.DrawObject(args);
 }
示例#2
0
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            int x = 30;
            int y = 30;
            SkinCheckObjectPainter p    = new SkinCheckObjectPainter(UserLookAndFeel.Default);
            CheckObjectInfoArgs    args = new CheckObjectInfoArgs(DevExpress.Utils.AppearanceObject.ControlAppearance);

            args.Graphics = e.Graphics;
            DrawCheckBox(x, y, "Caramel", CheckState.Unchecked, CheckStyles.Standard, p, args);
            x += 30;
            DrawCheckBox(x, y, "Caramel", CheckState.Checked, CheckStyles.Standard, p, args);
            x += 30;
            DrawCheckBox(x, y, "Blue", CheckState.Checked, CheckStyles.Radio, p, args);
            x += 30;
            DrawCheckBox(x, y, "Blue", CheckState.Unchecked, CheckStyles.Radio, p, args);
        }