How do I bind to another control's property from a trigger?

Posted by rrhartjr on Stack Overflow See other posts from Stack Overflow or by rrhartjr
Published on 2010-03-26T00:45:12Z Indexed on 2010/03/26 0:53 UTC
Read the original article Hit count: 411

Filed under:
|
|
|

In my particular case, I want to bind to the IsReadOnly property of a TextBox to set the Content property of a Button? They are both part of the same StackPanel.

I've tried doing it with a DataTrigger with a Binding to the ElementName of the TextBox and a Trigger using the TextBox name as the SourceName.

Any thoughts?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about styles