Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

TagObjects Property, ItemClass Class

Defines application-specific data.

Class: ItemClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public object[] TagObjects { get; set; }
Public Property TagObjects As Object()

Value

An array of application-specific objects.

The default value is null/Nothing.

Comments

Defines application-specific data.

The TagObjects property can be used by an application to attach application-specific data to an item. Objects stored in the TagObjects property are serialized when items are saved/loaded, provided the objects support serialization. The data stored in the TagObjects property is not used by controls in any way.

The ItemClass.TagString property can be used to store an additional application-specific string.

The ItemClass.TagObject property can be used to access the first element of the TagObjects array.

The CellBaseClass.TagString and CellBaseClass.TagObjects properties can be used to store application-specific with cells.

Examples

C#

                MessageBox.Show(e.Message);
                return;
            }
            LoadAssembly(asm);
        }

        private void ListInfo(ItemCollectionClass itemCollection, Assembly a) {
            ItemClass item = itemCollection.Add("Custom Attributes");
            item.TagObjects = a.GetCustomAttributes(true);
            item.ExpandCollapseButton = item.TagObjects.Length > 0 ? ExpandCollapseButtonStyleEnum.Show : ExpandCollapseButtonStyleEnum.Hide;

            item = itemCollection.Add("Exported Types");
            item.TagObjects = a.GetExportedTypes();
            item.ExpandCollapseButton = item.TagObjects.Length > 0 ? ExpandCollapseButtonStyleEnum.Show : ExpandCollapseButtonStyleEnum.Hide;

            item = itemCollection.Add("Files");

VB.NET

        Return
    End Try
    LoadAssembly(asm)
End Sub

Private Sub ListInfo(ByVal itemCollection As ItemCollectionClass, ByVal a As Assembly)

    Dim item As ItemClass = itemCollection.Add("Custom Attributes")
    item.TagObjects = a.GetCustomAttributes(True)
    If item.TagObjects.Length > 0 Then
        item.ExpandCollapseButton = ExpandCollapseButtonStyleEnum.Show
    Else
        item.ExpandCollapseButton = ExpandCollapseButtonStyleEnum.Hide
    End If

    item = itemCollection.Add("Exported Types")

See Also ItemClass Class | Classes | SftTree/NET 2.0



Spring Break!

Our offices will be closed this week (March 18 through March 22).

We'll be back March 24 to address any pending sales and support issues.