From Dependency Property Setting Precedence List, your SetRanderTransformTranslateProperty
is higher than control's RenderTransform
, to prevent ScaleTransform from being overwritten by TranslateTransform, you can set it in under LayoutTransform
. Take CheckBox using your SetRanderTransformTranslateProperty as an example:
<CheckBox Width="130" Height="30" Content="Click Yellow" Background="Yellow" local:GeneralBehaviors.SetRanderTransformTranslateProperty="60,60"></CheckBox>
<CheckBox Width="130" Height="30" Content="Click green" Background="Green" local:GeneralBehaviors.SetRanderTransformTranslateProperty="60,60">
<CheckBox.LayoutTransform>
<ScaleTransform ScaleX="5" ScaleY="5"></ScaleTransform>
</CheckBox.LayoutTransform>
</CheckBox>
and the result picture is:
If I misunderstand your question,please point out.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.