Game Development Reference
In-Depth Information
Figure 20.1 Screenshot of a PropertyGrid in the Visual Studio .NET IDE.
A PropertyGrid can be bound to any managed object and programmatically build
a user interface that can modify the public properties of the object with hardly any
work! In this chapter, I will show you how to create a class with bindable properties,
and then show you how to bind an instance of this class to a PropertyGrid control.
There is too much information on the PropertyGrid to be covered in a short chapter,
but the core functionality should be summarized enough to be applicable to the
majority of tools and utilities.
Designing a Bindable Class
There really is no configuration that has to happen on the PropertyGrid control,
because all the configuration information is specified in the classes that are bound
to the PropertyGrid . The PropertyGrid control interrogates bound classes to find
certain attributes of properties that describe things, such as what category they are
in, the description of the property, and what the default value is. You can also hide
properties from being shown in the PropertyGrid with an attribute as well.
Search Nedrilad ::




Custom Search