In our data layer, we need to create "style" objects that could inherit their values from other "style" objects.
Example scenario 1:
class Style
{
string Name;
string ParentName;
// Other properties go here.
}
So, when there is a list of such styles, a style with a parent name should inherit it's style values from it's parent.
Scenario 2:
class ConatiningType
{
Style BaseStyle;
Style MouseHoverStyle;
}
In the above case, the MouseHoverStyle should inherit it's values from the BaseStyle.
I am sure there are some recommended design patterns for this scenario. If so, please point to those.