首页 > 解决方案 > WPF - 更改 App.xaml 中定义的 FontSize

问题描述

我在我的 App.xaml 文件中设置 FontSize 属性,如下所示:

<Style TargetType="{x:Type Button}">
     <Setter Property="FontSize" Value="14"/>
      ...
 </Style>

依此类推,适用于不同的控制类型。

我想要做的是让用户有可能修改字体大小,因此在后面的代码中修改这些值。我该如何修改?或者这是否可以将我的 App.xaml 中的值“绑定”到我的 ViewModel 中的某些值?

标签: c#wpf

解决方案


推荐阅读