是否可以根据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>
答案 0 :(得分:0)
不,那是不可能的。重新设置时必须完全替换边距。