layouttransform

WPF ToolTip Style with dynamic LayoutTransform

坚强是说给别人听的谎言 提交于 2020-01-06 15:20:10
问题 I have an app that scales it's UI and I want to scale the ToolTips with it. I have tried doing this: <Style TargetType="{x:Type ToolTip}"> <Setter Property="LayoutTransform" Value="{DynamicResource scaleTransf}"/> ... </Style> ...where scaleTransf is a resource that I change via code: Application.Current.Resources["scaleTransf"] = new ScaleTransform(...); with: <ScaleTransform x:Key="scaleTransf" ScaleX="1" ScaleY="1"/> Most of the ToolTips do get scaled in size but some of them that are