ImageCell is a Cell used to display images from ImageList.
For a list of all members of this type, see ImageCell Members.
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Resco.Controls.AdvancedTree.Cell
Resco.Controls.AdvancedTree.ImageCell
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
The ImageCell is the Cell capable to display Images from the ImageList.
Displayed image is determined by the constant ImageIndex, or is taken from the Node when setting the non-constant CellSource. Constant image index is useful for button-like cells, preferably in selected node templates, e. g. shopping cart icon on the detail of product info. Non-constant index is useful for giving data dependent graphical information, e.g. flags or fancy background, as seen in the packaged
Images can be resized to the size of the Cell if the AutoResize property is set to true, or can be aligned in the cell by the chosen Alignment. One color can be made transparent by setting the TransparentColor property (limited on the CompactFramework). Or you can make transparent the color in the pixel (0,0) of every image by setting the AutoTransparent property to true.
Note Images from the image list are cached for the better performance, so be sure to set the ImageList property again, when some changes were made in the image list.
This sample shows the generated code to create empty cell with desired properties: [Visual Basic]
Dim ImageCell1 As New Resco.Controls.AdvancedTree.ImageCell
ImageCell1.Alignment = Resco.Controls.AdvancedTree.Alignment.TopRight
ImageCell1.Bounds = New System.Drawing.Rectangle(200, 0, -1, 16)
ImageCell1.CellSource.ColumnName = "Flag"
ImageCell1.ImageList = this.ImageList2
NodeTemplate1.CellTemplates.Add(ImageCell1)
[C#]
Resco.Controls.AdvancedTree.ImageCell imageCell1 = new Resco.Controls.AdvancedTree.ImageCell();
imageCell1.Alignment = Resco.Controls.AdvancedTree.Alignment.TopRight;
imageCell1.Bounds = new System.Drawing.Rectangle(200, 0, -1, 16);
imageCell1.CellSource.ColumnName = "Flag";
imageCell1.ImageList = this.ImageList2;
nodeTemplate1.CellTemplates.Add(imageCell1);
Namespace: Resco.Controls.AdvancedTree
Assembly: Resco.AdvancedTree.CF3 (in Resco.AdvancedTree.CF3.dll)
ImageCell Members | Resco.Controls.AdvancedTree Namespace | Samples