Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Can I put Polygon inside Button Template Dynamically?

Can I put Polygon inside Button Template Dynamically?

Scheduled Pinned Locked Moved WPF
question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    salon
    wrote on last edited by
    #1

    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?

    A 1 Reply Last reply
    0
    • S salon

      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?

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      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).

      S 1 Reply Last reply
      0
      • A Abhinav S

        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).

        S Offline
        S Offline
        salon
        wrote on last edited by
        #3

        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?

        A 1 Reply Last reply
        0
        • S salon

          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?

          A Offline
          A Offline
          Abhinav S
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups