Version

ImageTransparentColor Property (UltraNumericEditorBase)

Syntax
'Declaration
 
Public Property ImageTransparentColor As Color
public Color ImageTransparentColor {get; set;}
Example
This example demonstrates how to set the UltraWinEditors controls to use an ImageList, and to specify a transparent color for the images they display.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinEditors


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim transparent As Color = Color.Transparent
        Dim imageList As ImageList = Me.GetImageList()

        '	Set the ImageTransparentColor property of the UltraWinEditors
        '	controls to Color.Transparent.
        Me.UltraTextEditor1.ImageTransparentColor = transparent
        Me.UltraComboEditor1.ImageTransparentColor = transparent
        Me.UltraFontNameEditor1.ImageTransparentColor = transparent
        Me.UltraDateTimeEditor1.ImageTransparentColor = transparent
        Me.UltraNumericEditor1.ImageTransparentColor = transparent
        Me.UltraCurrencyEditor1.ImageTransparentColor = transparent

        '	Set the ImageList property of the UltraWinEditors
        '	controls to the ImageList we created above.
        Me.UltraTextEditor1.ImageList = imageList
        Me.UltraComboEditor1.ImageList = imageList
        Me.UltraFontNameEditor1.ImageList = imageList
        Me.UltraDateTimeEditor1.ImageList = imageList
        Me.UltraNumericEditor1.ImageList = imageList
        Me.UltraCurrencyEditor1.ImageList = imageList

        '	Set the Image property of each control's Appearance to
        '	an image in the ImageList. We can do this by setting it to
        '	a member of the ImageList's Images collection, or its index
        '	in the Images collection.
        Me.UltraTextEditor1.Appearance.Image = 0
        Me.UltraComboEditor1.Appearance.Image = 1
		Me.ultraFontNameEditor1.Appearance.Image = Me.ultraFontNameEditor1.ImageList.Images(2)
        Me.UltraDateTimeEditor1.Appearance.Image = 3
		Me.ultraNumericEditor1.Appearance.Image = Me.ultraFontNameEditor1.ImageList.Images(4)
        Me.UltraCurrencyEditor1.Appearance.Image = 5

    End Sub

    Private Function GetImageList() As ImageList
        '	Create an ImageList
        Dim imageList As ImageList = New ImageList()
        Dim newSize As Size = New Size(16, 16)

        '	Convert some system icons to bitmaps and add them to the ImageList
        Dim bitmap As System.Drawing.Bitmap = New System.Drawing.Bitmap(SystemIcons.Warning.ToBitmap(), newSize)
        imageList.Images.Add(bitmap)

        bitmap = New System.Drawing.Bitmap(SystemIcons.Error.ToBitmap(), newSize)
        imageList.Images.Add(bitmap)

        bitmap = New System.Drawing.Bitmap(SystemIcons.Hand.ToBitmap(), newSize)
        imageList.Images.Add(bitmap)

        bitmap = New System.Drawing.Bitmap(SystemIcons.Question.ToBitmap(), newSize)
        imageList.Images.Add(bitmap)

        bitmap = New System.Drawing.Bitmap(SystemIcons.Asterisk.ToBitmap(), newSize)
        imageList.Images.Add(bitmap)

        bitmap = New System.Drawing.Bitmap(SystemIcons.Application.ToBitmap(), newSize)
        imageList.Images.Add(bitmap)

        Return imageList

    End Function
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinEditors;


		private void button1_Click(object sender, System.EventArgs e)
		{
			Color transparent = Color.Transparent;
			ImageList imageList = this.GetImageList();

			//	Set the ImageTransparentColor property of the UltraWinEditors
			//	controls to Color.Transparent.
			this.ultraTextEditor1.ImageTransparentColor = transparent;
			this.ultraComboEditor1.ImageTransparentColor = transparent;
			this.ultraFontNameEditor1.ImageTransparentColor = transparent;
			this.ultraDateTimeEditor1.ImageTransparentColor = transparent;
			this.ultraNumericEditor1.ImageTransparentColor = transparent;
			this.ultraCurrencyEditor1.ImageTransparentColor = transparent;

			//	Set the ImageList property of the UltraWinEditors
			//	controls to the ImageList we created above.
			this.ultraTextEditor1.ImageList = imageList;
			this.ultraComboEditor1.ImageList = imageList;
			this.ultraFontNameEditor1.ImageList = imageList;
			this.ultraDateTimeEditor1.ImageList = imageList;
			this.ultraNumericEditor1.ImageList = imageList;
			this.ultraCurrencyEditor1.ImageList = imageList;

			//	Set the Image property of each control's Appearance to
			//	an image in the ImageList. We can do this by setting it to
			//	a member of the ImageList's Images collection, or its index
			//	in the Images collection.
			this.ultraTextEditor1.Appearance.Image = 0;
			this.ultraComboEditor1.Appearance.Image = 1;
			this.ultraFontNameEditor1.Appearance.Image = this.ultraFontNameEditor1.ImageList.Images[2];
			this.ultraDateTimeEditor1.Appearance.Image = 3;
			this.ultraNumericEditor1.Appearance.Image = this.ultraFontNameEditor1.ImageList.Images[4];
			this.ultraCurrencyEditor1.Appearance.Image = 5;
			
		}

		private ImageList GetImageList()
		{
			//	Create an ImageList
			ImageList imageList = new ImageList();
			Size newSize = new Size(16, 16);

			//	Convert some system icons to bitmaps and add them to the ImageList
			System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap( SystemIcons.Warning.ToBitmap(), newSize );
			imageList.Images.Add( bitmap );

			bitmap = new System.Drawing.Bitmap( SystemIcons.Error.ToBitmap(), newSize );
			imageList.Images.Add( bitmap );
			
			bitmap = new System.Drawing.Bitmap( SystemIcons.Hand.ToBitmap(), newSize );
			imageList.Images.Add( bitmap );
			
			bitmap = new System.Drawing.Bitmap( SystemIcons.Question.ToBitmap(), newSize );
			imageList.Images.Add( bitmap );
			
			bitmap = new System.Drawing.Bitmap( SystemIcons.Asterisk.ToBitmap(), newSize );
			imageList.Images.Add( bitmap );

			bitmap = new System.Drawing.Bitmap( SystemIcons.Application.ToBitmap(), newSize );
			imageList.Images.Add( bitmap );

			return imageList;
		}
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