Class XPTaskBarItem
Represents an item in the XPTaskBarBox.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class XPTaskBarItem : IChangeNotifyingItem, ISerializable, ICloneable
Examples
Take a look at the XPTaskBar class reference for an example of the usage of this control.
Constructors
XPTaskBarItem()
Overloaded. Creates a new instance of the XPTaskBarItem class.
Declaration
public XPTaskBarItem()
XPTaskBarItem(SerializationInfo, StreamingContext)
Declaration
protected XPTaskBarItem(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | |
System.Runtime.Serialization.StreamingContext | context |
XPTaskBarItem(String, Color, Int32, Object, String)
Creates a new instance of the XPTaskBarItem class and sets its text, forecolor, imageIndex, tag and indicates whether it is a hyper link.
Declaration
public XPTaskBarItem(string text, Color foreColor, int imageIndex, object tag, string toolTip)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text of the item. |
System.Drawing.Color | foreColor | The forecolor for the item. |
System.Int32 | imageIndex | The index into the XPTaskBarBox's ImageList. |
System.Object | tag | A tag object that you can set for convenience. |
System.String | toolTip |
XPTaskBarItem(String, Color, Int32, Object, String, Boolean, Boolean, String)
Creates a new instance of the XPTaskBarItem class and sets its text, forecolor, imageIndex, tag and indicates whether it is a hyper link.
Declaration
public XPTaskBarItem(string text, Color foreColor, int imageIndex, object tag, string toolTip, bool visible, bool enabled, string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text of the item. |
System.Drawing.Color | foreColor | The forecolor for the item. |
System.Int32 | imageIndex | The index into the XPTaskBarBox's ImageList. |
System.Object | tag | A tag object that you can set for convenience. |
System.String | toolTip | Contains text for tooltip. Empty string or null value means no tooltip. |
System.Boolean | visible | Indicates whether the item is displayed. |
System.Boolean | enabled | Indicates whether the item can respond to user interaction. |
System.String | name | Name of the item. |
XPTaskBarItem(String, Color, Int32, Object, String, Boolean, Boolean, String, Font)
Declaration
public XPTaskBarItem(string text, Color foreColor, int imageIndex, object tag, string toolTip, bool visible, bool enabled, string name, Font font)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | |
System.Drawing.Color | foreColor | |
System.Int32 | imageIndex | |
System.Object | tag | |
System.String | toolTip | |
System.Boolean | visible | |
System.Boolean | enabled | |
System.String | name | |
System.Drawing.Font | font |
XPTaskBarItem(String, Color, Int32, Object, String, Boolean, Boolean, String, Font, Int32)
Declaration
public XPTaskBarItem(string text, Color foreColor, int imageIndex, object tag, string toolTip, bool visible, bool enabled, string name, Font font, int leftSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | |
System.Drawing.Color | foreColor | |
System.Int32 | imageIndex | |
System.Object | tag | |
System.String | toolTip | |
System.Boolean | visible | |
System.Boolean | enabled | |
System.String | name | |
System.Drawing.Font | font | |
System.Int32 | leftSpacing |
XPTaskBarItem(String, Color, Int32, String)
Creates a new instance of the XPTaskBarItem class and sets its text, forecolor, imageIndex and indicates whether it is a hyper link.
Declaration
public XPTaskBarItem(string text, Color foreColor, int imageIndex, string toolTip)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text of the item. |
System.Drawing.Color | foreColor | The forecolor for the item. |
System.Int32 | imageIndex | The index into the XPTaskBarBox's ImageList. |
System.String | toolTip | A tag object that you can set for convenience. |
Properties
Bounds
Declaration
public Rectangle Bounds { get; set; }
Property Value
Type |
---|
System.Drawing.Rectangle |
Enabled
Indicates whether the item can respond to user interaction.
Declaration
public bool Enabled { get; set; }
Property Value
Type |
---|
System.Boolean |
ForeColor
Gets / sets the foreground color (typically the color of the text) property of the XPTaskBarItem.
Declaration
public Color ForeColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color | A color that represents the foreground color. The default is Color.Empty. |
Remarks
Changing this property's value will throw the PropertyChanged event.
Image
Returns item's image.
Declaration
protected Image Image { get; }
Property Value
Type |
---|
System.Drawing.Image |
ImageIndex
Gets / sets an index into the ImageList in the corresponding XPTaskBarBox.
Declaration
public int ImageIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | A zero-based index that represents the position in the ImageList control (assigned to the ImageList property of the XPTaskBarBox) where the image is located. The default is -1. |
Remarks
Changing this property's value will throw the PropertyChanged event.
ImageList
Retrieves the image list associated with the item.
Declaration
public ImageList ImageList { get; }
Property Value
Type |
---|
System.Windows.Forms.ImageList |
ItemFont
Gets or sets the item font.
Declaration
public Font ItemFont { get; set; }
Property Value
Type |
---|
System.Drawing.Font |
LeftSpacing
Gets or sets the spacing (indent) to the left of text.
Declaration
public int LeftSpacing { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The left spacing. |
Name
Gets / sets the name of the item.
Declaration
public string Name { get; set; }
Property Value
Type |
---|
System.String |
Parent
Gets / sets the XPTaskBarBox that this item is part of.
Declaration
public object Parent { get; set; }
Property Value
Type |
---|
System.Object |
Tag
Gets / sets the object that contains data about the item.
Declaration
public object Tag { get; set; }
Property Value
Type | Description |
---|---|
System.Object | An Object that contains data about the control. The default is a null reference (Nothing in Visual Basic). |
Remarks
Any type derived from the Object class can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text may be assigned.
Text
Gets / sets the item's text.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string value. |
Remarks
Changing this property's value will throw the PropertyChanged event.
ToolTip
Gets / sets the text for tooltip. Empty string or null value means no tooltip.
Declaration
public string ToolTip { get; set; }
Property Value
Type |
---|
System.String |
Visible
Indicates whether the item is displayed.
Declaration
public bool Visible { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
Clone()
Creates a copy of ArrayList Collection.
Declaration
public object Clone()
Returns
Type |
---|
System.Object |
GenerateUniqueName()
Declaration
public static string GenerateUniqueName()
Returns
Type |
---|
System.String |
OnPropertyChanged(SyncfusionPropertyChangedEventArgs)
Raises the PropertyChanged event.
Declaration
protected void OnPropertyChanged(SyncfusionPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
SyncfusionPropertyChangedEventArgs | args | An SyncfusionPropertyChangedEventArgs that contains the event data. |
Remarks
The OnPropertyChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnPropertyChanged in a derived class, be sure to call the base class's OnPropertyChanged method so that registered delegates receive the event.
ResetForeColor()
Declaration
protected void ResetForeColor()
SetImage(Image)
Declaration
protected void SetImage(Image image)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Image | image |
ShouldSerializeForeColor()
Declaration
protected bool ShouldSerializeForeColor()
Returns
Type |
---|
System.Boolean |
Events
PropertyChanged
Occurs when one of the XPTaskBarItem's property has changed.
Declaration
public event SyncfusionPropertyChangedEventHandler PropertyChanged
Event Type
Type |
---|
SyncfusionPropertyChangedEventHandler |
Remarks
This event may not be thrown for some of the properties in BarItem. Take a look at the property's documentation to confirm whether this event will be thrown for a property.
This event will also be raised when it's associated MainBarManager's value changes too.
Explicit Interface Implementations
ISerializable.GetObjectData(SerializationInfo, StreamingContext)
Declaration
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | |
System.Runtime.Serialization.StreamingContext | context |