c# - WPF - 更改 App.xaml 中定义的 FontSize
问题描述
我在我的 App.xaml 文件中设置 FontSize 属性,如下所示:
<Style TargetType="{x:Type Button}">
<Setter Property="FontSize" Value="14"/>
...
</Style>
依此类推,适用于不同的控制类型。
我想要做的是让用户有可能修改字体大小,因此在后面的代码中修改这些值。我该如何修改?或者这是否可以将我的 App.xaml 中的值“绑定”到我的 ViewModel 中的某些值?
解决方案
推荐阅读
- python - 将xml数据转换为数据框
- javascript - ui选择范围模型值中的选择框数组未正确显示
- java - How to properly handle InpuStream as a method argument
- git - nopCommerce4.10 从 tfs 获取时显示警告,结果构建失败
- dynamics-crm - 从邮递员到 Microsoft Dynamics crm 365 的 POST/GET 请求
- python - 如何使用 Docker-SDK 将保存的 Docker 镜像文件推送到注册表?
- android - 为什么某些android设备的内部存储中没有创建文件夹?
- java - 如何将值从递归方法传递给调用它的方法?
- javascript - HTML, CSS 优化页面太多图片
- matrix - 将未知大小的矩阵读取到 Fortran