问题标签 [toggleswitch]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
xaml - ContentPresenter 的“内容”未在 UWP 控件中垂直居中对齐
我正在使用 ToggleSwitch 控件在应用程序中显示 2 个专有选项。不幸的是,当 FontSize 增加时,“内容”部分似乎没有垂直居中对齐。为了验证这个问题,我尝试了一个简单的 ContentPresenter,即使我提供了 VerticalAlignment、VerticalContentAlignment 等。
不确定这是一个未解决的问题还是我在这里遗漏了什么?
白线在这里显示图像的中心。这只是一种情况,但随着字体大小的不同,对齐方式也会发生变化。因此,我们无法提供填充/边距,因为它对于各种 FontSizes 是不同的。
作为更新:我还尝试如下修改 ContentPresenter 样式并将其应用于上述 ContentPresenter (尽管仍然没有变化)