WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class BarRenderer

    Show / Hide Table of Contents

    Class BarRenderer

    Inheritance
    System.Object
    BarRenderer
    MultilineBarRenderer
    SingleLineBarRenderer
    Implements
    IBarRenderer
    IPopupChild
    INeedKeyboardMessages
    INeedMouseMoveMessages
    IPopupParent
    IPopupItem
    IDndTrackingControl
    IMouseHookHLProcClient
    IKeyboardProcHookClient
    System.IDisposable
    System.Windows.Forms.IMessageFilter
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Tools.XPMenus
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public abstract class BarRenderer : IBarRenderer, IPopupChild, INeedKeyboardMessages, INeedMouseMoveMessages, IPopupParent, IPopupItem, IDndTrackingControl, IMouseHookHLProcClient, IKeyboardProcHookClient, IDisposable, IMessageFilter

    Constructors

    BarRenderer(IBarControl)

    Declaration
    public BarRenderer(IBarControl parent)
    Parameters
    Type Name Description
    IBarControl parent

    Fields

    barAlignment

    Declaration
    protected CommandBarDockState barAlignment
    Field Value
    Type Description
    CommandBarDockState

    clickedItem

    Declaration
    protected int clickedItem
    Field Value
    Type Description
    System.Int32

    currentDndDropDown

    Declaration
    protected int currentDndDropDown
    Field Value
    Type Description
    System.Int32

    currentHotTrackItem

    Declaration
    protected int currentHotTrackItem
    Field Value
    Type Description
    System.Int32

    currentTooltipItem

    Declaration
    protected int currentTooltipItem
    Field Value
    Type Description
    System.Int32

    ignoreMouseMove

    Declaration
    protected bool ignoreMouseMove
    Field Value
    Type Description
    System.Boolean

    ignoreMouseMoveTick

    Declaration
    protected int ignoreMouseMoveTick
    Field Value
    Type Description
    System.Int32

    internalDragging

    Declaration
    protected bool internalDragging
    Field Value
    Type Description
    System.Boolean

    m_bXPMenuActive

    Variable to detect if application is active or inactive.

    Declaration
    protected bool m_bXPMenuActive
    Field Value
    Type Description
    System.Boolean

    mouseDownItem

    Declaration
    protected int mouseDownItem
    Field Value
    Type Description
    System.Int32

    padX

    Declaration
    protected float padX
    Field Value
    Type Description
    System.Single

    padY

    Declaration
    protected float padY
    Field Value
    Type Description
    System.Single

    parent

    Declaration
    protected IBarControl parent
    Field Value
    Type Description
    IBarControl

    selIndexOnDragStart

    Declaration
    protected int selIndexOnDragStart
    Field Value
    Type Description
    System.Int32

    separatorAreaX

    Declaration
    protected float separatorAreaX
    Field Value
    Type Description
    System.Single

    tdbounds

    Declaration
    protected RectangleF tdbounds
    Field Value
    Type Description
    System.Drawing.RectangleF

    tooltip

    Declaration
    protected ToolTip tooltip
    Field Value
    Type Description
    System.Windows.Forms.ToolTip

    Properties

    Alignment

    Declaration
    public CommandBarDockState Alignment { get; set; }
    Property Value
    Type Description
    CommandBarDockState

    Bar

    Declaration
    public Bar Bar { get; set; }
    Property Value
    Type Description
    Bar

    Bounds

    Declaration
    public RectangleF Bounds { get; set; }
    Property Value
    Type Description
    System.Drawing.RectangleF

    CustomizationPopup

    Declaration
    protected virtual CustomizingPopupMenu CustomizationPopup { get; }
    Property Value
    Type Description
    CustomizingPopupMenu

    Customizing

    Declaration
    public bool Customizing { get; }
    Property Value
    Type Description
    System.Boolean

    DelayedPerformClickOnBarItem

    Declaration
    public BarItem DelayedPerformClickOnBarItem { get; set; }
    Property Value
    Type Description
    BarItem

    DesignMode

    Declaration
    public bool DesignMode { get; }
    Property Value
    Type Description
    System.Boolean

    DndCustomizing

    Declaration
    public bool DndCustomizing { get; }
    Property Value
    Type Description
    System.Boolean

    HintViaHotKeyPrefix

    Declaration
    public bool HintViaHotKeyPrefix { get; set; }
    Property Value
    Type Description
    System.Boolean

    InvisibleBarItems

    Declaration
    public BarItems InvisibleBarItems { get; }
    Property Value
    Type Description
    BarItems

    IsMainMenu

    Declaration
    protected bool IsMainMenu { get; }
    Property Value
    Type Description
    System.Boolean

    IsVerticallyAligned

    Gets a value indicating wether the renderer has a vertical alignment.

    Declaration
    public bool IsVerticallyAligned { get; }
    Property Value
    Type Description
    System.Boolean

    LargeIcons

    Declaration
    public bool LargeIcons { get; }
    Property Value
    Type Description
    System.Boolean

    NeedDropDown

    Declaration
    protected bool NeedDropDown { get; set; }
    Property Value
    Type Description
    System.Boolean

    NeedLayout

    Declaration
    public bool NeedLayout { get; }
    Property Value
    Type Description
    System.Boolean

    PopupParent

    Declaration
    public IPopupParent PopupParent { get; }
    Property Value
    Type Description
    IPopupParent

    SelectedItem

    Returns the currently selected bar item in the corresponding toolbar.

    Declaration
    public BarItem SelectedItem { get; }
    Property Value
    Type Description
    BarItem

    This will return null if no bar item is currently selected.

    Style

    Declaration
    public VisualStyle Style { get; set; }
    Property Value
    Type Description
    VisualStyle

    ThemesEnabled

    Declaration
    public bool ThemesEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    ApplyDrawingTransform(PointF, Boolean)

    Declaration
    protected virtual PointF ApplyDrawingTransform(PointF point, bool apply)
    Parameters
    Type Name Description
    System.Drawing.PointF point
    System.Boolean apply
    Returns
    Type Description
    System.Drawing.PointF

    ApplyDrawingTransform(RectangleF, Boolean)

    Declaration
    protected virtual RectangleF ApplyDrawingTransform(RectangleF rect, bool apply)
    Parameters
    Type Name Description
    System.Drawing.RectangleF rect
    System.Boolean apply
    Returns
    Type Description
    System.Drawing.RectangleF

    ApplyTransform(Graphics, CommandBarDockState, BarStyle, RectangleF, Boolean)

    Declaration
    [Obsolete("Use RectangleF ApplyTransform( Graphics g, CommandBarDockState align, RectangleF rect, bool apply ) instead.")]
    public static RectangleF ApplyTransform(Graphics g, CommandBarDockState align, BarStyle barStyle, RectangleF rect, bool apply)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    CommandBarDockState align
    BarStyle barStyle
    System.Drawing.RectangleF rect
    System.Boolean apply
    Returns
    Type Description
    System.Drawing.RectangleF

    ApplyTransform(Graphics, CommandBarDockState, RectangleF, Boolean)

    Declaration
    public static RectangleF ApplyTransform(Graphics g, CommandBarDockState align, RectangleF rect, bool apply)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    CommandBarDockState align
    System.Drawing.RectangleF rect
    System.Boolean apply
    Returns
    Type Description
    System.Drawing.RectangleF

    Bar_PropertyChanged(Object, SyncfusionPropertyChangedEventArgs)

    Declaration
    protected virtual void Bar_PropertyChanged(object sender, SyncfusionPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    SyncfusionPropertyChangedEventArgs e

    BarItem_PropertyChanged(Object, SyncfusionPropertyChangedEventArgs)

    Declaration
    protected virtual void BarItem_PropertyChanged(object sender, SyncfusionPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    SyncfusionPropertyChangedEventArgs e

    CancelHidingDropDown()

    Declaration
    protected void CancelHidingDropDown()

    CanDropItem(BarItem)

    Declaration
    public bool CanDropItem(BarItem item)
    Parameters
    Type Name Description
    BarItem item
    Returns
    Type Description
    System.Boolean

    CanStartKeyboardNavigation()

    Declaration
    public bool CanStartKeyboardNavigation()
    Returns
    Type Description
    System.Boolean

    ChildClosing(IPopupChild, PopupCloseType)

    Declaration
    public virtual void ChildClosing(IPopupChild childUI, PopupCloseType popupCloseType)
    Parameters
    Type Name Description
    IPopupChild childUI
    PopupCloseType popupCloseType

    CloseDropdowns()

    Declaration
    protected virtual void CloseDropdowns()

    ComputeBarItemPositions(IGraphicsProvider)

    Declaration
    public abstract void ComputeBarItemPositions(IGraphicsProvider gp)
    Parameters
    Type Name Description
    IGraphicsProvider gp

    CreateCustomizationPopup()

    Declaration
    protected virtual CustomizingPopupMenu CreateCustomizationPopup()
    Returns
    Type Description
    CustomizingPopupMenu

    CreateNewRenderer(BarItem)

    Declaration
    protected virtual IBarItemRenderer CreateNewRenderer(BarItem barItem)
    Parameters
    Type Name Description
    BarItem barItem
    Returns
    Type Description
    IBarItemRenderer

    CreateToolTip()

    Declaration
    protected void CreateToolTip()

    CustomizationBegin(Object, EventArgs)

    Declaration
    protected virtual void CustomizationBegin(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    CustomizationDone(Object, EventArgs)

    Declaration
    protected virtual void CustomizationDone(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    Detach()

    Declaration
    public virtual void Detach()

    Dispose()

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    DisposeTooltip()

    Declaration
    protected void DisposeTooltip()

    DrawAdornments(Graphics)

    Declaration
    protected virtual void DrawAdornments(Graphics g)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Finalize()

    Declaration
    protected void Finalize()

    GetAllowedDragEffects()

    Declaration
    protected virtual DragDropEffects GetAllowedDragEffects()
    Returns
    Type Description
    System.Windows.Forms.DragDropEffects

    GetBarControl()

    Declaration
    public IBarControl GetBarControl()
    Returns
    Type Description
    IBarControl

    GetBarItemBounds(Int32)

    Declaration
    public virtual Rectangle GetBarItemBounds(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    System.Drawing.Rectangle

    GetBorderOverlapCue(PopupRelativeAlignment)

    Declaration
    public virtual Point[] GetBorderOverlapCue(PopupRelativeAlignment rAlign)
    Parameters
    Type Name Description
    PopupRelativeAlignment rAlign
    Returns
    Type Description
    System.Drawing.Point[]

    GetBoundsOf(BarItem)

    Declaration
    public Rectangle GetBoundsOf(BarItem item)
    Parameters
    Type Name Description
    BarItem item
    Returns
    Type Description
    System.Drawing.Rectangle

    GetControl()

    Declaration
    public Control GetControl()
    Returns
    Type Description
    System.Windows.Forms.Control

    GetCueRect(BarItem, Boolean)

    Declaration
    public Rectangle GetCueRect(BarItem barItem, bool beforeOrAfter)
    Parameters
    Type Name Description
    BarItem barItem
    System.Boolean beforeOrAfter
    Returns
    Type Description
    System.Drawing.Rectangle

    GetCurrentRenderer()

    Declaration
    protected IDropDownItem GetCurrentRenderer()
    Returns
    Type Description
    IDropDownItem

    GetFirstPopupAlignPreference()

    Declaration
    public virtual PopupRelativeAlignment GetFirstPopupAlignPreference()
    Returns
    Type Description
    PopupRelativeAlignment

    GetLocationForPopupAlignment(PopupRelativeAlignment, out PopupRelativeAlignment)

    Declaration
    public virtual Point GetLocationForPopupAlignment(PopupRelativeAlignment prevAlign, out PopupRelativeAlignment newAlign)
    Parameters
    Type Name Description
    PopupRelativeAlignment prevAlign
    PopupRelativeAlignment newAlign
    Returns
    Type Description
    System.Drawing.Point

    GetPopupParentControl()

    Declaration
    public virtual Control GetPopupParentControl()
    Returns
    Type Description
    System.Windows.Forms.Control

    GetPreferredSize(IGraphicsProvider, ref SizeF)

    Declaration
    public abstract void GetPreferredSize(IGraphicsProvider gp, ref SizeF preferredSize)
    Parameters
    Type Name Description
    IGraphicsProvider gp
    System.Drawing.SizeF preferredSize

    HidePopup(PopupCloseType)

    Declaration
    public virtual void HidePopup(PopupCloseType popupCloseType)
    Parameters
    Type Name Description
    PopupCloseType popupCloseType

    HitTestBarItem(Point, ref Boolean)

    Declaration
    public BarItem HitTestBarItem(Point mousePosition, ref bool beforeOrAfter)
    Parameters
    Type Name Description
    System.Drawing.Point mousePosition
    System.Boolean beforeOrAfter
    Returns
    Type Description
    BarItem

    HitTestBarItems(PointF)

    Declaration
    public int HitTestBarItems(PointF mousePosition)
    Parameters
    Type Name Description
    System.Drawing.PointF mousePosition
    Returns
    Type Description
    System.Int32

    InvalidateBarItems(Int32[])

    Declaration
    protected virtual void InvalidateBarItems(int[] barItemIndices)
    Parameters
    Type Name Description
    System.Int32[] barItemIndices

    InvalidateCachedTextSizes()

    Declaration
    public virtual void InvalidateCachedTextSizes()

    IsInteger(Single)

    Declaration
    public static bool IsInteger(float value)
    Parameters
    Type Name Description
    System.Single value
    Returns
    Type Description
    System.Boolean

    IsKeyboardNavigationOn()

    Declaration
    public bool IsKeyboardNavigationOn()
    Returns
    Type Description
    System.Boolean

    IsRelatedControl(Control, Boolean)

    Declaration
    public virtual bool IsRelatedControl(Control control, bool askPopupParent)
    Parameters
    Type Name Description
    System.Windows.Forms.Control control
    System.Boolean askPopupParent
    Returns
    Type Description
    System.Boolean

    IsShowing()

    Declaration
    public virtual bool IsShowing()
    Returns
    Type Description
    System.Boolean

    IsShowingDropdown()

    Declaration
    public bool IsShowingDropdown()
    Returns
    Type Description
    System.Boolean

    KeyboardMessage(ref Message)

    Declaration
    public virtual bool KeyboardMessage(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m
    Returns
    Type Description
    System.Boolean

    Layout(IGraphicsProvider)

    Declaration
    public virtual void Layout(IGraphicsProvider gp)
    Parameters
    Type Name Description
    IGraphicsProvider gp

    MouseMessage(ref Message)

    Declaration
    public virtual bool MouseMessage(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m
    Returns
    Type Description
    System.Boolean

    MoveSelection(MoveHint)

    Declaration
    protected virtual bool MoveSelection(MoveHint hint)
    Parameters
    Type Name Description
    MoveHint hint
    Returns
    Type Description
    System.Boolean

    OnBarItemsCollectionChanged()

    Declaration
    protected virtual void OnBarItemsCollectionChanged()

    OnBoundsAffected()

    Declaration
    protected virtual void OnBoundsAffected()

    OnCustomizingItemIndexChanged(EventArgs)

    Declaration
    protected void OnCustomizingItemIndexChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnDragDrop(DragEventArgs)

    Declaration
    public virtual void OnDragDrop(DragEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.DragEventArgs e

    OnDragLeave(EventArgs)

    Declaration
    public virtual void OnDragLeave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnDragOver(DragEventArgs)

    Declaration
    public virtual void OnDragOver(DragEventArgs drgevent)
    Parameters
    Type Name Description
    System.Windows.Forms.DragEventArgs drgevent

    OnEndDragging()

    Declaration
    protected virtual void OnEndDragging()

    OnFormDeactivated()

    Declaration
    public void OnFormDeactivated()

    OnGiveFeedback(GiveFeedbackEventArgs)

    Declaration
    public virtual void OnGiveFeedback(GiveFeedbackEventArgs gfbevent)
    Parameters
    Type Name Description
    System.Windows.Forms.GiveFeedbackEventArgs gfbevent

    OnMouseDoubleClick(MouseEventArgs)

    See System.Windows.Forms.Control.OnMouseDoubleClick(System.Windows.Forms.MouseEventArgs).

    Declaration
    public virtual void OnMouseDoubleClick(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnMouseDown(MouseEventArgs)

    Declaration
    public virtual bool OnMouseDown(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e
    Returns
    Type Description
    System.Boolean

    OnMouseLeave(EventArgs)

    Declaration
    public virtual void OnMouseLeave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnMouseMove(MouseEventArgs)

    Declaration
    public virtual void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnMouseUp(MouseEventArgs)

    Declaration
    public virtual void OnMouseUp(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnMouseWheel(MouseEventArgs)

    Declaration
    public virtual void OnMouseWheel(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnPaint(Graphics, Rectangle)

    Declaration
    public virtual void OnPaint(Graphics g, Rectangle clipRect)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle clipRect

    OnRightMouseDown(MouseEventArgs)

    Declaration
    protected virtual void OnRightMouseDown(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnStartDragging()

    Declaration
    protected virtual void OnStartDragging()

    PreFilterMessage(ref Message)

    Declaration
    public bool PreFilterMessage(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m
    Returns
    Type Description
    System.Boolean

    ProcessCmdKey(ref Message, Keys)

    Declaration
    public virtual bool ProcessCmdKey(ref Message msg, Keys keyData)
    Parameters
    Type Name Description
    System.Windows.Forms.Message msg
    System.Windows.Forms.Keys keyData
    Returns
    Type Description
    System.Boolean

    ProcessKeyDown(Keys)

    Declaration
    protected virtual bool ProcessKeyDown(Keys key)
    Parameters
    Type Name Description
    System.Windows.Forms.Keys key
    Returns
    Type Description
    System.Boolean

    ProcessMnemonic(Char)

    Declaration
    public virtual bool ProcessMnemonic(char charCode)
    Parameters
    Type Name Description
    System.Char charCode
    Returns
    Type Description
    System.Boolean

    ProcessShortcut(Char)

    Declaration
    public virtual bool ProcessShortcut(char c)
    Parameters
    Type Name Description
    System.Char c
    Returns
    Type Description
    System.Boolean

    RemoveBarItemRenderers(Boolean)

    Declaration
    protected virtual void RemoveBarItemRenderers(bool forceRemove)
    Parameters
    Type Name Description
    System.Boolean forceRemove

    RemoveRenderer(IBarItemRenderer, Int32)

    Declaration
    protected virtual void RemoveRenderer(IBarItemRenderer renderer, int curPos)
    Parameters
    Type Name Description
    IBarItemRenderer renderer
    System.Int32 curPos

    ResetDragging()

    Declaration
    protected virtual void ResetDragging()

    ResetHotTracking()

    Declaration
    protected void ResetHotTracking()

    SetCurrentTrackItem(Int32, Boolean, Boolean)

    Declaration
    public void SetCurrentTrackItem(int newHitBarItem, bool forceDropDown, bool setDefaultSelection)
    Parameters
    Type Name Description
    System.Int32 newHitBarItem
    System.Boolean forceDropDown
    System.Boolean setDefaultSelection

    SetHotTrack(BarItemRenderer, Boolean)

    Declaration
    public void SetHotTrack(BarItemRenderer renderer, bool hotTrack)
    Parameters
    Type Name Description
    BarItemRenderer renderer
    System.Boolean hotTrack

    SetNeedLayout(Boolean)

    Declaration
    protected void SetNeedLayout(bool needLayout)
    Parameters
    Type Name Description
    System.Boolean needLayout

    ShouldDrawVisible(BarItem, Boolean)

    Declaration
    protected virtual bool ShouldDrawVisible(BarItem item, bool excludeControlBasedItems)
    Parameters
    Type Name Description
    BarItem item
    System.Boolean excludeControlBasedItems
    Returns
    Type Description
    System.Boolean

    StartKeyboardNavigation()

    Declaration
    public void StartKeyboardNavigation()

    StopKeyboardNavigation()

    Declaration
    public void StopKeyboardNavigation()

    ValidateDndHelper()

    Declaration
    protected virtual void ValidateDndHelper()

    VeryifyMouseBasedDeactivation(Control, Int32)

    Declaration
    protected virtual void VeryifyMouseBasedDeactivation(Control destinationControl, int msg)
    Parameters
    Type Name Description
    System.Windows.Forms.Control destinationControl
    System.Int32 msg

    Explicit Interface Implementations

    IKeyboardProcHookClient.KeyboardHookProc(Int32, Int32)

    Declaration
    bool IKeyboardProcHookClient.KeyboardHookProc(int wParam, int lParam)
    Parameters
    Type Name Description
    System.Int32 wParam
    System.Int32 lParam
    Returns
    Type Description
    System.Boolean

    IMouseHookHLProcClient.MouseHookProc(Int32, Point, IntPtr, Int32, Int32)

    Declaration
    bool IMouseHookHLProcClient.MouseHookProc(int msg, Point point, IntPtr hwnd, int wHitTestCode, int dwExtraInfo)
    Parameters
    Type Name Description
    System.Int32 msg
    System.Drawing.Point point
    System.IntPtr hwnd
    System.Int32 wHitTestCode
    System.Int32 dwExtraInfo
    Returns
    Type Description
    System.Boolean

    IPopupParent.IsRightToLeft

    Declaration
    bool IPopupParent.IsRightToLeft { get; }
    Returns
    Type Description
    System.Boolean

    IBarRenderer.RemoveRenderer(IBarItemRenderer)

    Declaration
    void IBarRenderer.RemoveRenderer(IBarItemRenderer renderer)
    Parameters
    Type Name Description
    IBarItemRenderer renderer

    IBarRenderer.UpdateRenderers()

    Declaration
    void IBarRenderer.UpdateRenderers()

    Implements

    IBarRenderer
    IPopupChild
    INeedKeyboardMessages
    INeedMouseMoveMessages
    IPopupParent
    IPopupItem
    IDndTrackingControl
    IMouseHookHLProcClient
    IKeyboardProcHookClient
    System.IDisposable
    System.Windows.Forms.IMessageFilter
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved