如何在代码隐藏中为类型设置默认样式,例如:
<ScaleTransform x:Key="scaler" ScaleX="1.25" ScaleY="1.25" />
<Style TargetType="{x:Type ToolTip}">
<Setter Property="LayoutTransform" Value="{DynamicResource scaler}"/>
</Style>
我需要在代码隐藏中而不是在 xaml 标记中设置工具提示的样式。
如何在代码隐藏中为类型设置默认样式,例如:
<ScaleTransform x:Key="scaler" ScaleX="1.25" ScaleY="1.25" />
<Style TargetType="{x:Type ToolTip}">
<Setter Property="LayoutTransform" Value="{DynamicResource scaler}"/>
</Style>
我需要在代码隐藏中而不是在 xaml 标记中设置工具提示的样式。