Gregg Walker
2008-05-07 23:38:23 UTC
Hi,
I have an inherited control that derives from a control from a vendor.
Let's call the vendor control VC and my inherited control myVC.
VC has a property Calendar which itself has various other properties such as
BackColor. So to access in code from myVC i would use
this.Calendar.BackColor syntax.
The vendor has changed the default value for Calendar.BackColor property and
I want to be able to override the default value with the prior default in
myVC.
I'm not sure how to do this. I was looking at the ShouldSerializeXXXX and
ResetXXXX methods but I don't know how to make them work with nested
properties.
I tried this could but it did not work.
private bool ShouldSerializeCalendar_BackColor()
{
return Calendar.BackColor != SystemColors.Window;
}
private void ResetCalendar_BackColor()
{
Calendar.BackColor = SystemColors.Window;
}
Is this possible and if so how would one go about implementing in the
derived class?
--
Gregg Walker
I have an inherited control that derives from a control from a vendor.
Let's call the vendor control VC and my inherited control myVC.
VC has a property Calendar which itself has various other properties such as
BackColor. So to access in code from myVC i would use
this.Calendar.BackColor syntax.
The vendor has changed the default value for Calendar.BackColor property and
I want to be able to override the default value with the prior default in
myVC.
I'm not sure how to do this. I was looking at the ShouldSerializeXXXX and
ResetXXXX methods but I don't know how to make them work with nested
properties.
I tried this could but it did not work.
private bool ShouldSerializeCalendar_BackColor()
{
return Calendar.BackColor != SystemColors.Window;
}
private void ResetCalendar_BackColor()
{
Calendar.BackColor = SystemColors.Window;
}
Is this possible and if so how would one go about implementing in the
derived class?
--
Gregg Walker