Version

ItemAppearance Property (UltraOptionSet)

Returns or sets the Infragistics.Win.AppearanceBase object that controls formatting of the items in the control's dropdown list.
Syntax
'Declaration
 
Public Property ItemAppearance As Infragistics.Win.AppearanceBase
public Infragistics.Win.AppearanceBase ItemAppearance {get; set;}
Example
This sample sets up the items on an option set, sets the item appearance which is the appearance that the individual items default to. It also bolds the currently checked item.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Imports Infragistics.Win
 		
 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

     Me.UltraOptionSet1.Items.Clear()
     Me.UltraOptionSet1.Items.Add(1, "One")
     Me.UltraOptionSet1.Items.Add(2, "Two")
     Me.UltraOptionSet1.Items.Add(3, "Three")
     Me.UltraOptionSet1.Items.Add(4, "Four")
     Me.UltraOptionSet1.ItemAppearance.Image = Me.Icon.ToBitmap()
     Me.UltraOptionSet1.ImageTransparentColor = Color.FromArgb(192, 192, 192)
     Me.UltraOptionSet1.Appearance.BackColor = Color.Red
     Me.UltraOptionSet1.Appearance.BackColor2 = Color.Yellow
     Me.UltraOptionSet1.Appearance.BackGradientStyle = GradientStyle.HorizontalBump
     Me.UltraOptionSet1.ItemSpacingVertical += 20
     Me.UltraOptionSet1.BorderStyle = UIElementBorderStyle.Solid
Me.ultraOptionSet1.ItemOrigin = new Point(5,5)
Me.ultraOptionSet1.CheckedIndex = 0

 End Sub

 Private Sub UltraOptionSet1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UltraOptionSet1.ValueChanged

     Dim i As Integer = 0

     For i = 0 To Me.UltraOptionSet1.Items.Count - 1
         Me.UltraOptionSet1.Items(i).Appearance.FontData.Bold = DefaultableBoolean.False

         Me.UltraOptionSet1.CheckedItem.Appearance.FontData.Bold = DefaultableBoolean.True
     Next i

 End Sub
using Infragistics.Win;

private void Form1_Load(object sender, System.EventArgs e)
{

	this.ultraOptionSet1.Items.Clear();
	this.ultraOptionSet1.Items.Add(1,"One");
	this.ultraOptionSet1.Items.Add(2,"Two");
	this.ultraOptionSet1.Items.Add(3,"Three");
	this.ultraOptionSet1.Items.Add(4,"Four");
	this.ultraOptionSet1.ItemAppearance.Image = this.Icon.ToBitmap();
	this.ultraOptionSet1.ImageTransparentColor = Color.FromArgb(192,192,192);
	this.ultraOptionSet1.Appearance.BackColor = Color.Red;
	this.ultraOptionSet1.Appearance.BackColor2 = Color.Yellow;
	this.ultraOptionSet1.Appearance.BackGradientStyle = GradientStyle.HorizontalBump ;
	this.ultraOptionSet1.ItemSpacingVertical += 20;
	this.ultraOptionSet1.BorderStyle = UIElementBorderStyle.Solid;
	this.ultraOptionSet1.ItemOrigin = new Point(5,5);
	this.ultraOptionSet1.CheckedIndex = 0;
	
}

private void ultraOptionSet1_ValueChanged(object sender, System.EventArgs e)
{

	for(int i = 0; i < this.ultraOptionSet1.Items.Count;i++)
		this.ultraOptionSet1.Items[i].Appearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.False;

	this.ultraOptionSet1.CheckedItem.Appearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.True ;

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also