How to change the color of a button in Dundas Dashboard v 2.5 on Click -
how can change color of button in dundas dashboard v 2.5 on click. know have on click interaction , have assign fill property.
how using linear gradient brush.
thanks suggestions in advance!
there 2 ways linear gradient brush can set fill property to.
1) if need dynamic, build brush ground using script. instance:
dashboardlineargradientbrush b = new dashboardlineargradientbrush(); b.startpoint = new point (0,0); b.endpoint = new point(0,1); dashboardgradientstop stop = new dashboardgradientstop(colors.black, 0); b.gradientstops.add(stop); stop = new dashboardgradientstop(colors.white, 1.0); b.gradientstops.add(stop); button1.fill = b;
2) if you're switching between predefined colors, create rectangle shape outside dashboard canvas , set brush on rectangle. then, when want switch color, can in on click interaction:
button1.fill = rectangle1.fill;
Comments
Post a Comment