Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the purpose of Winforms controls tags?

Tags:

winforms

I see a 'Tag' property in the design view for most WinForms controls. I have never used this tag and want to know why I would want to use it.

like image 675
Reena Avatar asked Apr 15 '10 14:04

Reena


People also ask

What is the use of control Tag?

Similar to Google Analytics for websites, Control Tag is a snippet of code that gets placed in the </head> section of a website to enable tracking, targeting and more.

What are controls in WinForms?

Windows Forms controls are reusable components that encapsulate user interface functionality and are used in client-side, Windows-based applications. Not only does Windows Forms provide many ready-to-use controls, it also provides the infrastructure for developing your own controls.

Why would a user add controls to a form?

Most forms are designed by adding controls to the surface of the form to define a user interface (UI). A control is a component on a form used to display information or accept user input.

What is Label control in C#?

A Label control is used as a display medium for text on Forms. Label control does not participate in user input or capture mouse or keyboard events. A Label control is used as a display medium for text on Forms. Label control does not participate in user input or capture mouse or keyboard events.


2 Answers

It allows you to store some of your own data with a control. It mostly useful in tree controls where you might want each node/leaf to have some extra data associated with it. This way when you click on a node you can perform an action relevant to the node.

like image 58
Matt Warren Avatar answered Oct 23 '22 20:10

Matt Warren


Its a general "catch-all" for additional data you wish to store with a control.

I too have never used it.

like image 7
Jamiec Avatar answered Oct 23 '22 20:10

Jamiec