开发者

Manipulate/Lookup Markup from Code

开发者 https://www.devze.com 2023-03-09 17:54 出处:网络
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)

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

0

精彩评论

暂无评论...
验证码 换一张
取 消