menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ComboBoxItemRenderer - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ComboBoxItemRenderer

    Inheritance
    System.Object
    BarItemRenderer
    ComboBoxItemRenderer
    EditableComboRenderer
    Implements
    IBarItemRenderer
    System.IDisposable
    IDropDownItem
    Inherited Members
    BarItemRenderer.Active
    BarItemRenderer.AddTextPreferredSize(IGraphicsProvider, SizeF)
    BarItemRenderer.ApplyTransform(Graphics)
    BarItemRenderer.Dispose()
    BarItemRenderer.DrawFocusRect(Graphics, RectangleF, Color, Color)
    BarItemRenderer.DrawInterior(DrawToolbarItemEventArgs)
    BarItemRenderer.DrawSeparator(Graphics, RectangleF)
    BarItemRenderer.DrawText(Graphics, String, Font, Color, RectangleF, TextFormatFlags)
    BarItemRenderer.DrawTextAndImage(Graphics, RectangleF, Font, Brush, Color, DrawItemState)
    BarItemRenderer.DropDown(Boolean, Boolean, Queue)
    BarItemRenderer.DropDownAreaX
    BarItemRenderer.GetBGColor2()
    BarItemRenderer.GetBorderCheckPen(String)
    BarItemRenderer.GetBorderPen(String)
    BarItemRenderer.GetBorderPressPen(String)
    BarItemRenderer.GetCheckedItemLightColor(VisualStyle)
    BarItemRenderer.GetCurrentThemeState(DrawToolbarItemEventArgs)
    BarItemRenderer.GetDrawingBounds()
    BarItemRenderer.GetDropDownAreaWidth()
    BarItemRenderer.GetForeColor(DrawItemState)
    BarItemRenderer.GetForeColorOffice2003(DrawItemState)
    BarItemRenderer.GetForeColorOffice2007(DrawItemState)
    BarItemRenderer.GetForeColorOffice2010(DrawItemState)
    BarItemRenderer.GetForeColorOffice2016(DrawItemState)
    BarItemRenderer.GetForeColorVS2005(DrawItemState)
    BarItemRenderer.GetHighlightItemDarkColor(VisualStyle)
    BarItemRenderer.GetHighlightItemLightColor(VisualStyle)
    BarItemRenderer.GetMainManager()
    BarItemRenderer.GetPressedItemDarktColor(VisualStyle)
    BarItemRenderer.GetPressedItemLightColor(VisualStyle)
    BarItemRenderer.GetTextAndImageRect(Graphics, Rectangle)
    BarItemRenderer.GetTextPosition(Graphics, String, Font, RectangleF, StringFormat)
    BarItemRenderer.GetTextPosition(Graphics, String, Font, RectangleF, TextFormatFlags)
    BarItemRenderer.HitTest(PointF)
    BarItemRenderer.HotTrack
    BarItemRenderer.ImageTextPadding
    BarItemRenderer.InvalidateCachedTextSizes()
    BarItemRenderer.IsDisposed
    BarItemRenderer.IsHorizontalAligned
    BarItemRenderer.IsMouseDown()
    BarItemRenderer.IsParentMainMenu
    BarItemRenderer.IsRTL
    BarItemRenderer.IsTextOnly()
    BarItemRenderer.lastDrawnBounds
    BarItemRenderer.MeasureText(Graphics, String, Font)
    BarItemRenderer.MeasureText(Graphics, String, Font, TextFormatFlags)
    BarItemRenderer.OnPaint(Graphics, Rectangle)
    BarItemRenderer.PadX
    BarItemRenderer.PadY
    BarItemRenderer.parent
    BarItemRenderer.Repaint()
    BarItemRenderer.ShouldDrawImage()
    BarItemRenderer.showDefaultSelectionInDropdown
    BarItemRenderer.ShowDropShadow
    BarItemRenderer.ShowHighlightRectangle
    BarItemRenderer.ShowingDropDown
    BarItemRenderer.Style
    BarItemRenderer.ThemesEnabled
    BarItemRenderer.Visible
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Tools.XPMenus
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class ComboBoxItemRenderer : BarItemRenderer, IBarItemRenderer, IDisposable, IDropDownItem

    Constructors

    ComboBoxItemRenderer(IBarRenderer)

    Declaration
    public ComboBoxItemRenderer(IBarRenderer parent)
    Parameters
    Type Name Description
    IBarRenderer parent

    Fields

    DEF_BORDER_OFFSET

    Used due to ComboDropDown item should be drawn with little left and right margins.

    Declaration
    protected const int DEF_BORDER_OFFSET = 3
    Field Value
    Type
    System.Int32

    DEF_SELECTION_OFFSET

    Used to correct customization selection rectangle for ComboDropDown items.

    Declaration
    protected const int DEF_SELECTION_OFFSET = 2
    Field Value
    Type
    System.Int32

    listBoxContainer

    Declaration
    protected ListBoxContainer listBoxContainer
    Field Value
    Type
    ListBoxContainer

    popupChild

    Declaration
    protected IPopupChild popupChild
    Field Value
    Type
    IPopupChild

    popupParent

    Declaration
    protected IPopupParent popupParent
    Field Value
    Type
    IPopupParent

    Properties

    BarItem

    Declaration
    public override BarItem BarItem { get; set; }
    Property Value
    Type
    BarItem
    Overrides
    BarItemRenderer.BarItem

    Bounds

    Declaration
    public override RectangleF Bounds { get; set; }
    Property Value
    Type
    System.Drawing.RectangleF
    Overrides
    BarItemRenderer.Bounds

    ComboBoxBarItem

    Declaration
    protected ComboBoxBarItem ComboBoxBarItem { get; }
    Property Value
    Type
    ComboBoxBarItem

    IgnoreExternalMouseMessages

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

    IsCustomListBox

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

    ListBox

    Declaration
    public ListBox ListBox { get; }
    Property Value
    Type
    System.Windows.Forms.ListBox

    NeedCenterVAlign

    Declaration
    public override bool NeedCenterVAlign { get; }
    Property Value
    Type
    System.Boolean
    Overrides
    BarItemRenderer.NeedCenterVAlign

    TextAreaBounds

    Declaration
    protected virtual Rectangle TextAreaBounds { get; }
    Property Value
    Type
    System.Drawing.Rectangle

    Methods

    AfterChildClosing()

    Declaration
    public virtual void AfterChildClosing()

    BarItemPropertyChanged(SyncfusionPropertyChangedEventArgs)

    Declaration
    public override void BarItemPropertyChanged(SyncfusionPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    SyncfusionPropertyChangedEventArgs e
    Overrides
    BarItemRenderer.BarItemPropertyChanged(SyncfusionPropertyChangedEventArgs)

    ChildClosing(IPopupChild, PopupCloseType)

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

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    BarItemRenderer.Dispose(Boolean)

    DrawBackground(DrawToolbarItemEventArgs, Boolean)

    Declaration
    protected override void DrawBackground(DrawToolbarItemEventArgs drawItemInfo, bool useThemes)
    Parameters
    Type Name Description
    DrawToolbarItemEventArgs drawItemInfo
    System.Boolean useThemes
    Overrides
    BarItemRenderer.DrawBackground(DrawToolbarItemEventArgs, Boolean)

    DrawBorders(DrawToolbarItemEventArgs, Boolean)

    Declaration
    protected override void DrawBorders(DrawToolbarItemEventArgs drawItemInfo, bool useThemes)
    Parameters
    Type Name Description
    DrawToolbarItemEventArgs drawItemInfo
    System.Boolean useThemes
    Overrides
    BarItemRenderer.DrawBorders(DrawToolbarItemEventArgs, Boolean)

    DrawSeparator(Graphics)

    Declaration
    public override void DrawSeparator(Graphics g)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    Overrides
    BarItemRenderer.DrawSeparator(Graphics)

    DrawTextAndImage(Graphics, RectangleF, Font, Color, Color, DrawItemState)

    Declaration
    protected override void DrawTextAndImage(Graphics g, RectangleF rectTextAndImage, Font textFont, Color textColor, Color bgColor, DrawItemState state)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.RectangleF rectTextAndImage
    System.Drawing.Font textFont
    System.Drawing.Color textColor
    System.Drawing.Color bgColor
    System.Windows.Forms.DrawItemState state
    Overrides
    BarItemRenderer.DrawTextAndImage(Graphics, RectangleF, Font, Color, Color, DrawItemState)

    FilterItemOnProperty(Object, String)

    Declaration
    protected object FilterItemOnProperty(object item, string field)
    Parameters
    Type Name Description
    System.Object item
    System.String field
    Returns
    Type
    System.Object

    GetArrowColor(String)

    Gets color for arrow of the ComboBox button amenably with VisualStyle.

    Declaration
    protected Color GetArrowColor(string themeName)
    Parameters
    Type Name Description
    System.String themeName
    Returns
    Type
    System.Drawing.Color

    GetBGColor()

    Declaration
    protected override Color GetBGColor()
    Returns
    Type
    System.Drawing.Color
    Overrides
    BarItemRenderer.GetBGColor()

    GetComboBoxDropDownWidth()

    Declaration
    protected int GetComboBoxDropDownWidth()
    Returns
    Type
    System.Int32

    GetDrawState()

    Declaration
    protected override ItemState GetDrawState()
    Returns
    Type
    ItemState
    Overrides
    BarItemRenderer.GetDrawState()

    GetDropDownArrowHeight()

    Declaration
    public static float GetDropDownArrowHeight()
    Returns
    Type
    System.Single

    GetDropDownArrowHeight(Boolean, Rectangle)

    Declaration
    public static float GetDropDownArrowHeight(bool resizeToFit, Rectangle rect)
    Parameters
    Type Name Description
    System.Boolean resizeToFit
    System.Drawing.Rectangle rect
    Returns
    Type
    System.Single

    GetDropDownArrowWidth()

    Declaration
    public static float GetDropDownArrowWidth()
    Returns
    Type
    System.Single

    GetDropDownArrowWidth(Boolean, Rectangle)

    Declaration
    public static float GetDropDownArrowWidth(bool resizeToFit, Rectangle rect)
    Parameters
    Type Name Description
    System.Boolean resizeToFit
    System.Drawing.Rectangle rect
    Returns
    Type
    System.Single

    GetDropDownBorderBounds(Boolean, Rectangle)

    Declaration
    public static Point[] GetDropDownBorderBounds(bool resizeToFit, Rectangle btnBounds)
    Parameters
    Type Name Description
    System.Boolean resizeToFit
    System.Drawing.Rectangle btnBounds
    Returns
    Type
    System.Drawing.Point[]

    GetDropDownBorderBounds(Rectangle)

    Declaration
    public static Point[] GetDropDownBorderBounds(Rectangle btnBounds)
    Parameters
    Type Name Description
    System.Drawing.Rectangle btnBounds
    Returns
    Type
    System.Drawing.Point[]

    GetDropDownBorderBounds(Rectangle, Int32, Int32)

    Declaration
    public static Point[] GetDropDownBorderBounds(Rectangle btnBounds, int arWidth, int arHeight)
    Parameters
    Type Name Description
    System.Drawing.Rectangle btnBounds
    System.Int32 arWidth
    System.Int32 arHeight
    Returns
    Type
    System.Drawing.Point[]

    GetFirstAlignPreference()

    Declaration
    protected PopupRelativeAlignment GetFirstAlignPreference()
    Returns
    Type
    PopupRelativeAlignment

    GetForeColorDefault(DrawItemState)

    Declaration
    protected override Color GetForeColorDefault(DrawItemState state)
    Parameters
    Type Name Description
    System.Windows.Forms.DrawItemState state
    Returns
    Type
    System.Drawing.Color
    Overrides
    BarItemRenderer.GetForeColorDefault(DrawItemState)

    GetIsMirrored()

    Declaration
    protected bool GetIsMirrored()
    Returns
    Type
    System.Boolean

    GetItemText(Object)

    Declaration
    public string GetItemText(object item)
    Parameters
    Type Name Description
    System.Object item
    Returns
    Type
    System.String

    GetListBoxText()

    Declaration
    protected virtual string GetListBoxText()
    Returns
    Type
    System.String

    GetPopupParentControl()

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

    GetPreferredSize(IGraphicsProvider)

    Declaration
    public override SizeF GetPreferredSize(IGraphicsProvider gp)
    Parameters
    Type Name Description
    IGraphicsProvider gp
    Returns
    Type
    System.Drawing.SizeF
    Overrides
    BarItemRenderer.GetPreferredSize(IGraphicsProvider)

    HideDropDown()

    Declaration
    protected override void HideDropDown()
    Overrides
    BarItemRenderer.HideDropDown()

    InitChoiceList()

    Declaration
    protected virtual void InitChoiceList()

    IsRelatedControl(Control)

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

    IsShowing()

    Declaration
    public bool IsShowing()
    Returns
    Type
    System.Boolean

    ListBox_LostFocus(Object, EventArgs)

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

    OffsetPointByDropDownArea(Point)

    Declaration
    protected Point OffsetPointByDropDownArea(Point point)
    Parameters
    Type Name Description
    System.Drawing.Point point
    Returns
    Type
    System.Drawing.Point

    OnEditPartKeyDown(Object, KeyEventArgs)

    Declaration
    protected virtual void OnEditPartKeyDown(object sender, KeyEventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.Windows.Forms.KeyEventArgs e

    OnMouseDown(Point)

    Declaration
    public override void OnMouseDown(Point pointMouseDown)
    Parameters
    Type Name Description
    System.Drawing.Point pointMouseDown
    Overrides
    BarItemRenderer.OnMouseDown(Point)

    OnMouseMove(Point)

    Declaration
    public override void OnMouseMove(Point pointMouseMove)
    Parameters
    Type Name Description
    System.Drawing.Point pointMouseMove
    Overrides
    BarItemRenderer.OnMouseMove(Point)

    OnMouseUp(Point)

    Declaration
    public override void OnMouseUp(Point pointMouseUp)
    Parameters
    Type Name Description
    System.Drawing.Point pointMouseUp
    Overrides
    BarItemRenderer.OnMouseUp(Point)

    OnMouseWheel(Boolean)

    Declaration
    public override void OnMouseWheel(bool isUp)
    Parameters
    Type Name Description
    System.Boolean isUp
    Overrides
    BarItemRenderer.OnMouseWheel(Boolean)

    ProcessKeyDown(Keys)

    Process keyboard messages.

    Declaration
    public override bool ProcessKeyDown(Keys key)
    Parameters
    Type Name Description
    System.Windows.Forms.Keys key
    Returns
    Type
    System.Boolean
    Overrides
    BarItemRenderer.ProcessKeyDown(Keys)

    ShouldDrawText()

    Declaration
    public override bool ShouldDrawText()
    Returns
    Type
    System.Boolean
    Overrides
    BarItemRenderer.ShouldDrawText()

    ShowDropDown(Queue)

    Declaration
    protected override bool ShowDropDown(Queue pbiQueue)
    Parameters
    Type Name Description
    System.Collections.Queue pbiQueue
    Returns
    Type
    System.Boolean
    Overrides
    BarItemRenderer.ShowDropDown(Queue)

    Explicit Interface Implementations

    IDropDownItem.GetBorderOverlapCue(PopupRelativeAlignment)

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

    IDropDownItem.GetLocationForPopupAlignment(PopupRelativeAlignment, out PopupRelativeAlignment)

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

    Implements

    IBarItemRenderer
    System.IDisposable
    IDropDownItem
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved