I have a customize object just like this.
01.
public
class
Person
02.
{
03.
[CategoryAttribute(
"Personal Info."
)]
04.
public
Name Name {
get
;
set
; }
05.
[CategoryAttribute(
"Personal Info."
)]
06.
public
int
Age {
get
;
set
; }
07.
[CategoryAttribute(
"Profession Info."
)]
08.
public
Profession Profession {
get
;
set
; }
09.
}
10.
11.
public
class
Profession
12.
{
13.
private
Title title_;
14.
15.
public
string
Company {
get
;
set
; }
16.
public
string
Address {
get
;
set
; }
17.
public
Title Title
18.
{
19.
get
{
return
title_; }
20.
set
21.
{
22.
title_ = value;
23.
if
(title_ == Title.Manager)
24.
{
25.
// hide property subordinates
26.
}
27.
else
if
(title_ == Title.Developer)
28.
{
29.
// show property subordinates
30.
}
31.
}
32.
}
33.
34.
public
List<Person> Subordinate {
get
;
set
; }
35.
}
Is there a way to show or hide Subordinate according to the property Title? When I selected the Title with Manager, the subordinate will appear. When I selected the Title with Developer, the subordinate will hide.