xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.

◆ tag() [1/2]

virtual std::any xtd::forms::control::tag ( ) const
inlinevirtualinherited

Gets the object that contains data about the control.

Returns
A std::any that contains data about the control. The default is empty.
Remarks
Any type of class can be assigned to this property.
A common use for the tag property is to store data that is closely associated with the control. For example, if you have a control that displays information about a customer, you might store a data_set that contains the customer's order history in that control's tag property so the data can be accessed quickly.