Is it possible to select items of the same type like jQuery selector in WPF?
<div class="good">123<div>
<div class="good">234<div>
<div class="good">345<div>
<div>aaa<div>
By jQuery, we can select all the div’s of class “good” by $(‘.good’).
For WPF, it is possible to do the selection like that by adding some sort of class to control?
ps: what i m doing is trying to change the style of a few controls from code behind. currently, i have made it by changing the style that has been applied to controls. at the moment, i think over it and have the question if WPF support this jQuery Style selection. Anyway, in WPF, it seems not a good idea to do in javascript way.
You can do something in that spirit (see this question) but I have the feeling that you are on the path of trying to do WPF like you do Javascript, which might not be the best way to do it.
If it’s the case I would recommend to look into MVVM, and especially this article which, with its exemple, is the best I ever found on that topic.