【发布时间】:2010-10-14 10:47:15
【问题描述】:
我是 WPF/XAML 的新手,目前正在做一个培训练习。
我有一个 noddy 应用程序,我想根据滚动条的位置更改标签中文本的大小。
文本由以下代码定义:
<FlowDocumentScrollViewer Grid.Row="1">
<FlowDocument>
<Paragraph>
Text goes here
</Paragraph>
</FlowDocument>
</FlowDocumentScrollViewer>
我正在尝试定义一个 Setter,我已经做到了:
<Style TargetType="{x:Type Paragraph}">
<Setter Property="FontSize" Value="???" />
</Style>
但我不知道需要什么“???”。我试过用谷歌搜索这个问题的答案,但我想我一定是使用了错误的搜索词,因为我还没有找到答案。
我猜这会很明显,但我不得不承认我被难住了。
【问题讨论】:
标签: wpf visual-studio xaml