是否可以根据XAML中的其他样式对样式进行小的调整,我想做这样的事情:
<Style TargetType="{x:PseudoType MostControls}" x:Key="WhatMostControlsLookLike">
<Setter Property="Margin" Value="10" />
</Style>
<Style TargetType="{x:PseudoType ThisControl}"
x:Key="WhatThisControlLooksLike"
BasedOn={StaticResource WhatMostControlsLookLike}">
<Setter Property="Margin">
<Setter.Value>
<!-- Top, Right, and Bottom are 10 as per WhatMostControlsLookLike-->
<Thickness>
<!-- But Left is 10 times as thick-->
<Thickness.Left>100</Thickness.Left>
</Thickness>
</Setter.Value>
</Setter>
</Style>
不,这是不可能的。再次设置时,必须完全替换保证金。