Ejemplo n.º 1
0
        protected override void PaintOverride(Paint.IGraphics screenRadGraphics, Rectangle clipRectangle, float angle, SizeF scale, bool useRelativeTransformation)
        {
            base.PaintOverride(screenRadGraphics, clipRectangle, angle, scale, useRelativeTransformation);
            if (base.Visibility != ElementVisibility.Visible || this.Parent == null)
            {
                return;
            }
            WizardPageHeaderElement pageHeader = this.Parent as WizardPageHeaderElement;

            if (pageHeader == null)
            {
                return;
            }

            RadWizardElement owner = pageHeader.Owner;

            if (DWMAPI.IsCompositionEnabled && !this.IsDesignMode && owner != null && owner.OwnerControl != null && owner.Mode == WizardMode.Aero && owner.EnableAeroStyle)
            {
                TelerikPaintHelper.DrawGlowingText(
                    (Graphics)screenRadGraphics.UnderlayGraphics,
                    this.Text,
                    this.Font,
                    this.ControlBoundingRectangle,
                    this.ForeColor, TextFormatFlags.EndEllipsis | TextFormatFlags.SingleLine | TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter);
            }
        }
Ejemplo n.º 2
0
 private void DrawSplitHelper(int splitSize)
 {
     if (this.splitTarget != null)
     {
         Rectangle rectangle = this.CalcSplitLine(splitSize, 3);
         IntPtr    handle    = this.ParentInternal.Handle;
         IntPtr    ptr2      = NativeMethods.GetDCEx(new HandleRef(this.ParentInternal, handle), NativeMethods.NullHandleRef, 0x402);
         IntPtr    ptr3      = TelerikPaintHelper.CreateHalftoneBrush();
         IntPtr    ptr4      = NativeMethods.SelectObject(new HandleRef(this.ParentInternal, ptr2), new HandleRef(null, ptr3));
         NativeMethods.PatBlt(new HandleRef(this.ParentInternal, ptr2), rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, 0x5a0049);
         NativeMethods.SelectObject(new HandleRef(this.ParentInternal, ptr2), new HandleRef(null, ptr4));
         NativeMethods.DeleteObject(new HandleRef(null, ptr3));
         NativeMethods.ReleaseDC(new HandleRef(this.ParentInternal, handle), new HandleRef(null, ptr2));
     }
 }
Ejemplo n.º 3
0
 private void DrawSplitBar()
 {
     if (this.lastSplitterDistance != -1)    //erase the drawed splitter
     {
         TelerikPaintHelper.DrawHalftoneLine(this, this.CalcSplitRectangle(this.lastSplitterDistance));
     }
     if (resizing)   //draw current splitter
     {
         TelerikPaintHelper.DrawHalftoneLine(this, this.CalcSplitRectangle(this.splitterDistance));
         this.lastSplitterDistance = this.splitterDistance;
     }
     else
     {
         this.lastSplitterDistance = -1;
     }
 }
Ejemplo n.º 4
0
        private void DrawSplitHelper(int splitSize)
        {
            if (this.splitTarget == null)
            {
                return;
            }
            Rectangle rectangle     = this.CalcSplitLine(splitSize, 3);
            IntPtr    handle1       = this.ParentInternal.Handle;
            IntPtr    dcEx          = Telerik.WinControls.NativeMethods.GetDCEx(new HandleRef((object)this.ParentInternal, handle1), Telerik.WinControls.NativeMethods.NullHandleRef, 1026);
            IntPtr    halftoneBrush = TelerikPaintHelper.CreateHalftoneBrush();
            IntPtr    handle2       = Telerik.WinControls.NativeMethods.SelectObject(new HandleRef((object)this.ParentInternal, dcEx), new HandleRef((object)null, halftoneBrush));

            Telerik.WinControls.NativeMethods.PatBlt(new HandleRef((object)this.ParentInternal, dcEx), rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, 5898313);
            Telerik.WinControls.NativeMethods.SelectObject(new HandleRef((object)this.ParentInternal, dcEx), new HandleRef((object)null, handle2));
            Telerik.WinControls.NativeMethods.DeleteObject(new HandleRef((object)null, halftoneBrush));
            Telerik.WinControls.NativeMethods.ReleaseDC(new HandleRef((object)this.ParentInternal, handle1), new HandleRef((object)null, dcEx));
        }