【发布时间】:2012-03-23 01:20:45
【问题描述】:
在我的 XAML 文件中有以下行:
<TextBox Text="{TemplateBinding ValueOutput}"
TextWrapping="Wrap" BorderBrush="#FF000000" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalContentAlignment="Center" x:Name="textBox"
Background="{TemplateBinding Background}" Focusable="False" IsHitTestVisible="False"
FontSize="{TemplateBinding FontSize}" Width="{TemplateBinding Width}" />
我想改变宽度属性,所以总是从定义的宽度中减去一个恒定像素。 它应该类似于
Width="{TemplateBinding Width}-1"
我只知道 XAML 几天,到目前为止我在 Internet 上找不到任何东西来解决这个问题。这只是一个语法问题还是不可能做到这一点?
感谢您的回答!
斯文
【问题讨论】:
标签: xaml