How can I bind a xaml property to a static variable in another class?

First of all you can’t bind to variable. You can bind only to properties from XAML.
For binding to static property you can do in this way (say you want to bind Text property of TextBlock) –

<TextBlock Text="{Binding Source={x:Static local:YourClassName.PropertyName}}"/>

where local is namespace where your class resides which you need to declare above in xaml file like this –

xmlns:local="clr-namespace:YourNameSpace"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)