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. WCF and WF
  4. SetTargetProperty for a Canvas

SetTargetProperty for a Canvas

Scheduled Pinned Locked Moved WCF and WF
questionwpfhelp
1 Posts 1 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.
  • A Offline
    A Offline
    AghaKhan
    wrote on last edited by
    #1

    If I am not using StoryBoard I cam use my canvas to animate with a simple function DoubleAnimation growAnimation = new DoubleAnimation(600, 0, TimeSpan.FromSeconds(1)); myCanvas.RenderTransform.BeginAnimation(ScaleTransform.ScaleXProperty, growAnimation); // Line 1 It works fine. Now I would like to add to the StoryBoard. Storyboard.SetTarget(growAnimation, myCanvas); Storyboard.SetTargetProperty(growAnimation, new PropertyPath(Canvas.WidthProperty)); It works up to seme extend, but I am not changing the width. I am looking the to set the property like Line 1 Obviously it works if I declare in xaml file like Storyboard.TargetProperty="(Canvas.RenderTransform).(ScaleTransform.ScaleX)" In other words what is equal of above lint in code behind? Storyboard.SetTargetProperty(growAnimation, new PropertyPath(What should be here)); Any help will be very much appreciated. best regards Agha Khan

    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