Manipulate/Lookup Markup from Code
we have some generalised functionality in our programs for UserControls. Unfortunatelly, I need to exclude some elements from the processing, depending on whether a certain attribute (i.e. IsReadOnly) was set explicitly in markup.
I think the easiest 开发者_如何学Pythonway is to take a look at the XAML that was used to declare the element. How can this be done?
If you add your generalized functionality as attached behaviours, you can enable/disable them via DataTriggers in your Styles
精彩评论