wpf: bind to a style property on main window from UserControl

Posted by Sonic Soul on Stack Overflow See other posts from Stack Overflow or by Sonic Soul
Published on 2010-06-15T12:34:21Z Indexed on 2010/06/16 2:22 UTC
Read the original article Hit count: 230

Filed under:

I have a UserControl which has a style, that i would like to be influenced by a settings checkbox on the main window hosting my user control

so myControl.xaml has a Style which i would like to have a trigger, that should observe a CheckBox inside MainWindow.xaml

i know one way to do this, would be to create a local property in myControl.cs which would look at the property in MainWindow.cs which would in turn return state of that cheeckbox.. but maybe there is a way to do this w/out writing any c# code ?

© Stack Overflow or respective owner

Related posts about wpf