How use math operations in XAML

前端 未结 1 1083
忘了有多久
忘了有多久 2021-02-04 06:17

I want use math operations in XAML code but I dont know how?

相关标签:
1条回答
  • 2021-02-04 06:38

    You mean you want to perform arithmetic operations in xaml?

    check out this post (it comes with a sample project)

    It allows you to specify code like this:

    <TextBlock Height="{Binding ElementName=tb1, Path=ActualHeight,
      Converter={StaticResource JScript},
      ConverterParameter=Int32.Parse(values[0])/10 *100-110 }" Background="Red"/>
    
    0 讨论(0)
提交回复
热议问题