Alex Sabaka
Alex Sabaka

Reputation: 429

How use math operations in XAML

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

Upvotes: 15

Views: 16014

Answers (1)

Jowen
Jowen

Reputation: 5383

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"/>

Upvotes: 19

Related Questions