Exemple #1
0
 /// <summary>
 /// Raises the NeedPaint event.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">An NeedLayoutEventArgs containing event data.</param>
 protected virtual void OnNeedPaint(object sender, NeedLayoutEventArgs e)
 {
     if (_needPaint != null)
     {
         _needPaint(this, e);
     }
 }
Exemple #2
0
 private void OnPaletteNeedPaint(object sender, NeedLayoutEventArgs e)
 {
     // Pass request onto the view provided paint delegate
     if (_viewPaintDelegate != null)
     {
         _viewPaintDelegate(this, e);
     }
 }
 private void OnIntegratedNeedPaint(object sender, NeedLayoutEventArgs e)
 {
     // If we have integrated the button into the custom chrome caption area
     if (_integrated)
     {
         _kryptonForm.PerformNeedPaint(e.NeedLayout);
     }
 }
Exemple #4
0
        /// <summary>
        /// Processes a notification from palette storage of a paint and optional layout required.
        /// </summary>
        /// <param name="sender">Source of notification.</param>
        /// <param name="e">An NeedLayoutEventArgs containing event data.</param>
        protected override void OnNeedPaint(object sender, NeedLayoutEventArgs e)
        {
            if (IsHandleCreated)
            {
                UpdateStateAndPalettes();
            }

            base.OnNeedPaint(sender, e);
        }
        private void OnAppButtonNeedPaint(object sender, NeedLayoutEventArgs e)
        {
            // Redraw the ribbon control to show change
            PerformNeedPaint(e.NeedLayout);
            _ribbon.Refresh();

            // If we have integrated the button into the custom chrome caption area
            if (_integrated)
            {
                _kryptonForm.PerformNeedPaint(e.NeedLayout);
            }
        }
        /// <summary>
        /// Processes a notification from palette storage of a paint and optional layout required.
        /// </summary>
        /// <param name="sender">Source of notification.</param>
        /// <param name="e">An NeedLayoutEventArgs containing event data.</param>
        /// <exception cref="ArgumentNullException"></exception>
        protected virtual void OnNeedPaint(object sender, NeedLayoutEventArgs e)
        {
            Debug.Assert(e != null);

            // Validate incoming reference
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            // If required, layout the control
            if (e.NeedLayout && !_layoutDirty)
            {
                _layoutDirty = true;
            }

            if (IsHandleCreated && (!_refreshAll || !e.InvalidRect.IsEmpty))
            {
                // Always request the repaint immediately
                if (e.InvalidRect.IsEmpty)
                {
                    _refreshAll = true;
                    Invalidate();
                }
                else
                {
                    Invalidate(e.InvalidRect);
                }

                // Do we need to use an Invoke to force repaint?
                if (!_refresh && EvalInvokePaint)
                {
                    BeginInvoke(_refreshCall);
                }

                // A refresh is outstanding
                _refresh = true;
            }
        }
        /// <summary>
        /// Processes a notification from palette storage of a paint and optional layout required.
        /// </summary>
        /// <param name="sender">Source of notification.</param>
        /// <param name="e">An NeedLayoutEventArgs containing event data.</param>
        /// <exception cref="ArgumentNullException"></exception>
        protected virtual void OnNeedPaint(object sender, NeedLayoutEventArgs e)
        {
            Debug.Assert(e != null);

            // Validate incoming reference
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            if (IsHandleCreated)
            {
                // Always request the repaint immediately
                if (e.InvalidRect.IsEmpty)
                {
                    Invalidate(true);
                }
                else
                {
                    Invalidate(e.InvalidRect, true);
                }
            }
        }
 /// <summary>
 /// Perform a need page paint on the navigator.
 /// </summary>
 /// <param name="sender">Source of notification.</param>
 /// <param name="e">An NeedLayoutEventArgs containing event data.</param>
 protected void OnNeedPagePaint(object sender, NeedLayoutEventArgs e)
 {
     // Pass paint request onto the navigator control itself
     Navigator.PerformNeedPagePaint(e.NeedLayout);
 }
 /// <summary>
 /// Raises the NeedPaint event.
 /// </summary>
 /// <param name="sender">Source of the event.</param>
 /// <param name="e">An NeedLayoutEventArgs containing event data.</param>
 protected virtual void OnNeedPaint(object sender, NeedLayoutEventArgs e)
 {
     _needPaint?.Invoke(this, e);
 }
Exemple #10
0
 private void OnButtonSpecPaint(object sender, NeedLayoutEventArgs e)
 {
     OnNeedPaint(sender, new NeedLayoutEventArgs(false));
 }
Exemple #11
0
 /// <summary>
 /// Processes a notification from palette of a paint and optional layout required.
 /// </summary>
 /// <param name="sender">Source of notification.</param>
 /// <param name="e">An NeedLayoutEventArgs containing event data.</param>
 protected virtual void OnPaletteNeedPaint(object sender, NeedLayoutEventArgs e)
 {
     // Need to recalculate anything relying on the palette
     OnNeedPaint(sender, e);
 }