Can I put Polygon inside Button Template Dynamically?
-
I have a togglebutton template which have vsm to do something on checked, pressed etc. I want to add Polygon inside that template and add storyboard to it.... I want to add it from .cs file...so that I can change the coordinates of polygon dynamically as the size of the button content.... How can I do that?
-
I have a togglebutton template which have vsm to do something on checked, pressed etc. I want to add Polygon inside that template and add storyboard to it.... I want to add it from .cs file...so that I can change the coordinates of polygon dynamically as the size of the button content.... How can I do that?
-
Did you take a look at the PathGeometry object? You could generate the polygon in blend and then assign it through code (i.e. your cs file).
-
Do u have any code snippet/link to just give me some idea and make things clear? Also one thing to note that this polygon should be inside buttton template so that I can give the animation?
Hi Salon, Try these links for the path object. http://mikuam.wordpress.com/2008/05/09/little-drawing-with-silverlight-in-c/[^] http://adanacp.spaces.live.com/Blog/cns!5C91A5A30159F17B!294.entry[^] I know too little about your application, but will binding to a path help you with the button template in some way? Thanks