Inheritance
System.Object
BarItemRenderer
Implements
System.IDisposable
Inherited Members
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()
Assembly: Syncfusion.Tools.Windows.dll
public class BarItemRenderer : IBarItemRenderer, IDisposable
Constructors
Declaration
public BarItemRenderer(IBarRenderer parent)
Parameters
Fields
Declaration
public static int DropDownAreaX
Field Value
Declaration
public static int ImageTextPadding
Field Value
Declaration
protected RectangleF lastDrawnBounds
Field Value
Type |
System.Drawing.RectangleF |
Declaration
Field Value
Declaration
Field Value
Declaration
protected IBarRenderer parent
Field Value
Declaration
protected bool showDefaultSelectionInDropdown
Field Value
Properties
Declaration
public virtual bool Active { get; set; }
Property Value
Declaration
public virtual BarItem BarItem { get; set; }
Property Value
Declaration
public virtual RectangleF Bounds { get; set; }
Property Value
Type |
System.Drawing.RectangleF |
Declaration
public virtual bool HotTrack { get; set; }
Property Value
Declaration
public bool IsDisposed { get; }
Property Value
Declaration
protected bool IsHorizontalAligned { get; }
Property Value
IsParentMainMenu
Declaration
protected bool IsParentMainMenu { get; }
Property Value
Declaration
protected bool IsRTL { get; }
Property Value
Declaration
public virtual bool NeedCenterVAlign { get; }
Property Value
Declaration
protected bool ShowDropShadow { get; }
Property Value
Declaration
protected bool ShowHighlightRectangle { get; }
Property Value
Declaration
public virtual bool ShowingDropDown { get; set; }
Property Value
Declaration
public VisualStyle Style { get; set; }
Property Value
Declaration
public bool ThemesEnabled { get; set; }
Property Value
Declaration
public virtual bool Visible { get; set; }
Property Value
Methods
Declaration
public virtual void AddTextPreferredSize(IGraphicsProvider gp, ref SizeF preferredSize)
Parameters
Declaration
protected virtual void ApplyTransform(Graphics g)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
g |
|
Declaration
public virtual void BarItemPropertyChanged(SyncfusionPropertyChangedEventArgs e)
Parameters
Declaration
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
Declaration
protected virtual void DrawBackground(DrawToolbarItemEventArgs drawItemInfo, bool useThemes)
Parameters
Declaration
protected virtual void DrawBorders(DrawToolbarItemEventArgs drawItemInfo, bool useThemes)
Parameters
Declaration
protected virtual void DrawFocusRect(Graphics g, RectangleF focusRect, Color fore, Color back)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
g |
|
System.Drawing.RectangleF |
focusRect |
|
System.Drawing.Color |
fore |
|
System.Drawing.Color |
back |
|
Declaration
protected virtual void DrawInterior(DrawToolbarItemEventArgs drawItemInfo)
Parameters
Declaration
public virtual void DrawSeparator(Graphics g)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
g |
|
Declaration
protected virtual void DrawSeparator(Graphics g, RectangleF fBounds)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
g |
|
System.Drawing.RectangleF |
fBounds |
|
Declaration
protected void DrawText(Graphics g, string text, Font textFont, Color textColor, RectangleF rectText, TextFormatFlags format)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
g |
The graphics.
|
System.String |
text |
The text.
|
System.Drawing.Font |
textFont |
|
System.Drawing.Color |
textColor |
Color of the text.
|
System.Drawing.RectangleF |
rectText |
The rectangle of the text.
|
System.Windows.Forms.TextFormatFlags |
format |
|
DrawTextAndImage(Graphics, RectangleF, Font, Brush, Color, DrawItemState)
Declaration
[Obsolete("Not used.")]
protected virtual void DrawTextAndImage(Graphics g, RectangleF rectTextAndImage, Font textFont, Brush textBrush, Color bgColor, DrawItemState state)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
g |
|
System.Drawing.RectangleF |
rectTextAndImage |
|
System.Drawing.Font |
textFont |
|
System.Drawing.Brush |
textBrush |
|
System.Drawing.Color |
bgColor |
|
System.Windows.Forms.DrawItemState |
state |
|
DrawTextAndImage(Graphics, RectangleF, Font, Color, Color, DrawItemState)
Declaration
protected virtual 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 |
|
Declaration
public void DropDown(bool show, bool setDefaultSelection, Queue pbiQueue)
Parameters
Type |
Name |
Description |
System.Boolean |
show |
|
System.Boolean |
setDefaultSelection |
|
System.Collections.Queue |
pbiQueue |
|
Declaration
protected void Finalize()
Declaration
protected virtual Color GetBGColor()
Returns
Type |
System.Drawing.Color |
Declaration
protected virtual Color GetBGColor2()
Returns
Type |
System.Drawing.Color |
Gets pen for border of the checked BarItem amenably with VisualStyle.
Declaration
protected Pen GetBorderCheckPen(string themeName)
Parameters
Type |
Name |
Description |
System.String |
themeName |
|
Returns
Gets pen for border of the BarItem amenably with VisualStyle.
Declaration
protected Pen GetBorderPen(string themeName)
Parameters
Type |
Name |
Description |
System.String |
themeName |
|
Returns
Gets pen for border of the pressed BarItem amenably with VisualStyle.
Declaration
protected Pen GetBorderPressPen(string themeName)
Parameters
Type |
Name |
Description |
System.String |
themeName |
|
Returns
Gets light color of the checked BarItem amenably with VisualStyle.
Declaration
protected virtual Color GetCheckedItemLightColor(VisualStyle style)
Parameters
Returns
Type |
System.Drawing.Color |
Declaration
protected virtual int GetCurrentThemeState(DrawToolbarItemEventArgs drawItemInfo)
Parameters
Returns
Declaration
protected virtual RectangleF GetDrawingBounds()
Returns
Type |
System.Drawing.RectangleF |
Gets state for drawing of the BarItem.
Declaration
protected virtual ItemState GetDrawState()
Returns
Declaration
protected int GetDropDownAreaWidth()
Returns
Declaration
protected virtual Color GetForeColor(DrawItemState state)
Parameters
Type |
Name |
Description |
System.Windows.Forms.DrawItemState |
state |
|
Returns
Type |
System.Drawing.Color |
Gets fore color for default visual style.
Declaration
protected virtual Color GetForeColorDefault(DrawItemState state)
Parameters
Type |
Name |
Description |
System.Windows.Forms.DrawItemState |
state |
|
Returns
Type |
System.Drawing.Color |
Gets fore color for Office2003 visual style.
Declaration
protected virtual Color GetForeColorOffice2003(DrawItemState state)
Parameters
Type |
Name |
Description |
System.Windows.Forms.DrawItemState |
state |
|
Returns
Type |
System.Drawing.Color |
Gets fore color for Office2007 visual style.
Declaration
protected virtual Color GetForeColorOffice2007(DrawItemState state)
Parameters
Type |
Name |
Description |
System.Windows.Forms.DrawItemState |
state |
|
Returns
Type |
System.Drawing.Color |
Gets fore color for Office2010 visual style.
Declaration
protected virtual Color GetForeColorOffice2010(DrawItemState state)
Parameters
Type |
Name |
Description |
System.Windows.Forms.DrawItemState |
state |
|
Returns
Type |
System.Drawing.Color |
Fore color for office2016 themes
Declaration
protected virtual Color GetForeColorOffice2016(DrawItemState state)
Parameters
Type |
Name |
Description |
System.Windows.Forms.DrawItemState |
state |
|
Returns
Type |
System.Drawing.Color |
Gets fore color for VS2005 visual style.
Declaration
protected virtual Color GetForeColorVS2005(DrawItemState state)
Parameters
Type |
Name |
Description |
System.Windows.Forms.DrawItemState |
state |
|
Returns
Type |
System.Drawing.Color |
Gets dark color of the highlighted BarItem amenably with VisualStyle.
Declaration
protected virtual Color GetHighlightItemDarkColor(VisualStyle style)
Parameters
Returns
Type |
System.Drawing.Color |
Gets light color of the highlighted BarItem amenably with VisualStyle.
Declaration
protected virtual Color GetHighlightItemLightColor(VisualStyle style)
Parameters
Returns
Type |
System.Drawing.Color |
GetMainManager()
Declaration
protected MainFrameBarManager GetMainManager()
Returns
Declaration
public virtual SizeF GetPreferredSize(IGraphicsProvider gp)
Parameters
Returns
Type |
System.Drawing.SizeF |
Gets dark color of the pressed BarItem amenably with VisualStyle.
Declaration
protected virtual Color GetPressedItemDarktColor(VisualStyle style)
Parameters
Returns
Type |
System.Drawing.Color |
Gets light color of the pressed BarItem amenably with VisualStyle.
Declaration
protected virtual Color GetPressedItemLightColor(VisualStyle style)
Parameters
Returns
Type |
System.Drawing.Color |
GetTextAndImageRect(Graphics, Rectangle)
Declaration
protected virtual RectangleF GetTextAndImageRect(Graphics g, Rectangle clippingRect)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
g |
|
System.Drawing.Rectangle |
clippingRect |
|
Returns
Type |
System.Drawing.RectangleF |
Declaration
[Obsolete("Not used.")]
public virtual RectangleF GetTextPosition(Graphics g, string text, Font font, RectangleF rectLayout, StringFormat stringformat)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
g |
|
System.String |
text |
|
System.Drawing.Font |
font |
|
System.Drawing.RectangleF |
rectLayout |
|
System.Drawing.StringFormat |
stringformat |
|
Returns
Type |
System.Drawing.RectangleF |
Declaration
public virtual RectangleF GetTextPosition(Graphics g, string text, Font font, RectangleF rectLayoutF, TextFormatFlags format)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
g |
|
System.String |
text |
|
System.Drawing.Font |
font |
|
System.Drawing.RectangleF |
rectLayoutF |
|
System.Windows.Forms.TextFormatFlags |
format |
|
Returns
Type |
System.Drawing.RectangleF |
Declaration
protected virtual void HideDropDown()
Declaration
public virtual bool HitTest(PointF mousePosition)
Parameters
Type |
Name |
Description |
System.Drawing.PointF |
mousePosition |
|
Returns
Declaration
public virtual void InvalidateCachedTextSizes()
Declaration
protected virtual bool IsMouseDown()
Returns
Declaration
protected bool IsTextOnly()
Returns
Measures text with default text format.
Declaration
protected Size MeasureText(Graphics g, string text, Font font)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
g |
The graphics.
|
System.String |
text |
The text.
|
System.Drawing.Font |
font |
The text's font.
|
Returns
Type |
Description |
System.Drawing.Size |
Size of the measured text.
|
Declaration
protected Size MeasureText(Graphics g, string text, Font font, TextFormatFlags textFormat)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
g |
The graphics.
|
System.String |
text |
The text.
|
System.Drawing.Font |
font |
The text's font.
|
System.Windows.Forms.TextFormatFlags |
textFormat |
The text's format.
|
Returns
Type |
Description |
System.Drawing.Size |
Size of the measured text.
|
Declaration
public virtual void OnMouseDown(Point pointMouseDown)
Parameters
Type |
Name |
Description |
System.Drawing.Point |
pointMouseDown |
|
Declaration
public virtual void OnMouseMove(Point pointMouseMove)
Parameters
Type |
Name |
Description |
System.Drawing.Point |
pointMouseMove |
|
Declaration
public virtual void OnMouseUp(Point pointMouseUp)
Parameters
Type |
Name |
Description |
System.Drawing.Point |
pointMouseUp |
|
Declaration
public virtual void OnMouseWheel(bool isUp)
Parameters
Type |
Name |
Description |
System.Boolean |
isUp |
|
Declaration
public virtual void OnPaint(Graphics g, Rectangle clippingRect)
Parameters
Type |
Name |
Description |
System.Drawing.Graphics |
g |
|
System.Drawing.Rectangle |
clippingRect |
|
Declaration
public virtual bool ProcessKeyDown(Keys key)
Parameters
Type |
Name |
Description |
System.Windows.Forms.Keys |
key |
|
Returns
Declaration
Declaration
protected virtual bool ShouldDrawImage()
Returns
Declaration
public virtual bool ShouldDrawText()
Returns
Declaration
protected virtual bool ShowDropDown(Queue pbiQueue)
Parameters
Type |
Name |
Description |
System.Collections.Queue |
pbiQueue |
|
Returns
Implements
System.IDisposable