wpf - How we can access VisualStateGroup of a Control -
i saw page. , started wondering how can access visualstategroup
of datagrid
, or of button
code ?
you can use getvisualstategroups method of visualstatemanager
.
if button
name of control:
ilist list = visualstatemanager.getvisualstategroups(button); if (list.count > 0) { visualstategroup visualstategroup = (visualstategroup)list[0]; foreach (visualstate visualstate in visualstategroup.states) { // put here logic } }
indeed list
observablecollection
, while states
freezablecollection
. hope can you.
Comments
Post a Comment