I have two simple field styles, one of which is based on the other.
<Style x:Key="marginStyle" TargetType="FrameworkElement"> <Setter Property="Margin" Value="0,10,20,10"/> </Style> <Style x:Key="marginIndentStyle" TargetType="FrameworkElement" BasedOn="{StaticResource marginStyle}"> <Setter Property="Margin" Value="10,0,0,0"/> </Style>
In the derived marginIndentStyle style, I want to adjust the margin of Left prop to 10 more than the left margin in the basic marginStyle style, which is 10 more than at the moment. Using such a function completely overrides the values. I just want to add to it such that the resulting margin for the marginIndentStyle derived style is "10,10,20,10".
Note. I do not want to strictly set its value to 10,10,20,10 b / c. I want any changes to the marginStyle style to be reflected in the derived marginIndentStyle style.
Is it possible?
source share