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. how to make the animation starts in all direction

how to make the animation starts in all direction

Scheduled Pinned Locked Moved WCF and WF
databasetutorialquestion
8 Posts 4 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.
  • F Offline
    F Offline
    Feras Mazen Taleb
    wrote on last edited by
    #1

    hello When Mouse over the image I will make it bigger by making a small trigger and when the mouse leave Image will return to its original size BUT when mouse over the image will turn to big BUT the Left Upper point will still fixed I mean I want to make it bigger in all direction :)

    You have To Search About The Truth Of Your Life Why Are you Here In Life ?

    M 1 Reply Last reply
    0
    • F Feras Mazen Taleb

      hello When Mouse over the image I will make it bigger by making a small trigger and when the mouse leave Image will return to its original size BUT when mouse over the image will turn to big BUT the Left Upper point will still fixed I mean I want to make it bigger in all direction :)

      You have To Search About The Truth Of Your Life Why Are you Here In Life ?

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      If you're using a ScaleTransform, you can set its CenterX/CenterY properties appropriately, for example:

      <Image Source="images/Silverlight\_Logo.jpg" Stretch="None" >
          <Image.RenderTransform>
              `<!-- image is 58x66 -->`
              <ScaleTransform `CenterX="29" CenterY="33"` />
          </Image.RenderTransform>
          <Image.Triggers>
              <EventTrigger RoutedEvent="Image.MouseEnter">
                  <EventTrigger.Actions>
                      <BeginStoryboard>
                          <Storyboard>
                              <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleX)" From="1" To="2" Duration="0:0:0.1" />
                              <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleY)" From="1" To="2" Duration="0:0:0.1" />
                          </Storyboard>
                      </BeginStoryboard>
                  </EventTrigger.Actions>
              </EventTrigger>
              <EventTrigger RoutedEvent="Image.MouseLeave">
                  <EventTrigger.Actions>
                      <BeginStoryboard>
                          <Storyboard>
                              <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleX)" From="2" To="1" Duration="0:0:0.1" />
                              <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleY)" From="2" To="1" Duration="0:0:0.1" />
                          </Storyboard>
                      </BeginStoryboard>
                  </EventTrigger.Actions>
              </EventTrigger>
          </Image.Triggers>
      </Image>
      

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      F realJSOPR 2 Replies Last reply
      0
      • M Mark Salsbery

        If you're using a ScaleTransform, you can set its CenterX/CenterY properties appropriately, for example:

        <Image Source="images/Silverlight\_Logo.jpg" Stretch="None" >
            <Image.RenderTransform>
                `<!-- image is 58x66 -->`
                <ScaleTransform `CenterX="29" CenterY="33"` />
            </Image.RenderTransform>
            <Image.Triggers>
                <EventTrigger RoutedEvent="Image.MouseEnter">
                    <EventTrigger.Actions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleX)" From="1" To="2" Duration="0:0:0.1" />
                                <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleY)" From="1" To="2" Duration="0:0:0.1" />
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
                <EventTrigger RoutedEvent="Image.MouseLeave">
                    <EventTrigger.Actions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleX)" From="2" To="1" Duration="0:0:0.1" />
                                <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleY)" From="2" To="1" Duration="0:0:0.1" />
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
            </Image.Triggers>
        </Image>
        

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        F Offline
        F Offline
        Feras Mazen Taleb
        wrote on last edited by
        #3

        thanks Mark it works well the image size is dynamic so I will set the CenterX and CenterY By Code after getting the Actual width for the image . :)

        You have To Search About The Truth Of Your Life Why Are you Here In Life ?

        M K 2 Replies Last reply
        0
        • F Feras Mazen Taleb

          thanks Mark it works well the image size is dynamic so I will set the CenterX and CenterY By Code after getting the Actual width for the image . :)

          You have To Search About The Truth Of Your Life Why Are you Here In Life ?

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          Feras Mazen Taleb wrote:

          it works well

          Cool :)

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          1 Reply Last reply
          0
          • M Mark Salsbery

            If you're using a ScaleTransform, you can set its CenterX/CenterY properties appropriately, for example:

            <Image Source="images/Silverlight\_Logo.jpg" Stretch="None" >
                <Image.RenderTransform>
                    `<!-- image is 58x66 -->`
                    <ScaleTransform `CenterX="29" CenterY="33"` />
                </Image.RenderTransform>
                <Image.Triggers>
                    <EventTrigger RoutedEvent="Image.MouseEnter">
                        <EventTrigger.Actions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleX)" From="1" To="2" Duration="0:0:0.1" />
                                    <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleY)" From="1" To="2" Duration="0:0:0.1" />
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger.Actions>
                    </EventTrigger>
                    <EventTrigger RoutedEvent="Image.MouseLeave">
                        <EventTrigger.Actions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleX)" From="2" To="1" Duration="0:0:0.1" />
                                    <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleY)" From="2" To="1" Duration="0:0:0.1" />
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger.Actions>
                    </EventTrigger>
                </Image.Triggers>
            </Image>
            

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            realJSOPR Offline
            realJSOPR Offline
            realJSOP
            wrote on last edited by
            #5

            Are the blushing smilies valid XAML?

            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

            M 1 Reply Last reply
            0
            • realJSOPR realJSOP

              Are the blushing smilies valid XAML?

              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
              -----
              "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              I agonized (:rolleyes:) over invalidating the XAML to get rid of the smilies, or leave it valid because it makes me laugh... my final choice is clear. Maybe someday the site with "Code" in its name will have an easy way to enter code in posts....even Microsoft managed to pull that off... To answer your question: Yes.

              Mark Salsbery Microsoft MVP - Visual C++ :java:

              1 Reply Last reply
              0
              • F Feras Mazen Taleb

                thanks Mark it works well the image size is dynamic so I will set the CenterX and CenterY By Code after getting the Actual width for the image . :)

                You have To Search About The Truth Of Your Life Why Are you Here In Life ?

                K Offline
                K Offline
                Kunal Chowdhury IN
                wrote on last edited by
                #7

                Use the following code:

                Regards, - K (My Blog)

                M 1 Reply Last reply
                0
                • K Kunal Chowdhury IN

                  Use the following code:

                  Regards, - K (My Blog)

                  M Offline
                  M Offline
                  Mark Salsbery
                  wrote on last edited by
                  #8

                  Nice one Centurion! :)

                  Mark Salsbery Microsoft MVP - Visual C++ :java:

                  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