Does XAML allows modification of bound value?
Like Width="{Binding Elementname="lstMine", Path=Width}" -100
? So that I can have a relative value.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can use converters for this purpose, and my WPF Converters library includes an ExpressionConverter
that allows you to do exactly that:
Width="{Binding Width, ElementName=lstMine, Converter={con:ExpressionConverter {}{0}-100}}"
回答2:
use Converter for these purpose