Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 771923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:43:50+00:00 2026-05-14T18:43:50+00:00

I have a client requesting an animated/panned image be added to their website. Basically,

  • 0

I have a client requesting an animated/panned image be added to their website. Basically, it’s a standard-size image, he wants to put it in a slightly narrower frame and have the image pan from left to right as a visual element on his website. There’s no clicking and dragging required; it’s just basically an animated pan from left to right, then re-start with another picture.

This is a .NET page, and I’ve got a stack of Silverlight books sitting here with the idea that I’m going to learn it. I figure now’s as good a time as any, since now I actually have a real-live use for it. For the record, I’m an experience .NET developer but have not played much with Silverlight beyond reading the first couple chapters of a few books.

So… first question, I’m assuming this is possible to do with Silverlight, am I wrong on that?

Second question, if I can do it, can someone point me in the right direction as far as what feature/control/technology is needed to do this? I’m reading up on deep zoom, but that doesn’t seem to be quite what I want. I just need to take a standard size jpeg/gif/whatever file and have it slowly pan from left to right. What Silverlight features do I need to study/spend some time learning in order to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T18:43:51+00:00Added an answer on May 14, 2026 at 6:43 pm

    This is certainly doable. You will essentially have an image sitting on a canvas and you’ll handle MouseMove events on that canvas. As the mouse tracks from one side to the other, you’ll apply a translation to the image to move it from side to side.

    The following code should get you started:

    Add a canvas with your image to MainPage.xaml (notice the MouseMove/Enter/Leave events)

    <Canvas x:Name="LayoutCanvas" MouseMove="LayoutCanvas_MouseMove" MouseEnter="LayoutCanvas_MouseEnter" Height="200" Width="200">
         <Image x:Name="imgToMove" Source="myimage.png" />
    </Canvas>
    

    In your code behind, add MouseMove/Enter/Leave events

        Point lastMousePos = new Point();
        Point currentMousePos = new Point();
        double amountToMove = 1;
        private void LayoutCanvas_MouseMove(object sender, MouseEventArgs e)
        {
            currentMousePos = e.GetPosition(LayoutCanvas);
            if (lastMousePos.X > currentMousePos.X)
            {
                amountToMove--;
            }
            else
            {
                amountToMove++;
            }
            imgToMove.SetValue(Canvas.LeftProperty, amountToMove);
            lastMousePos = currentMousePos;
        }
    
        private void LayoutCanvas_MouseEnter(object sender, MouseEventArgs e)
        {
            lastMousePos = e.GetPosition(LayoutCanvas);
        }
    
        private void LayoutCanvas_MouseLeave(object sender, MouseEventArgs e)
        {
            imgToMove.SetValue(Canvas.LeftProperty, (double)0);
        }
    

    And you’re done. Now, when you move your mouse over the image, the image will be translated from either left to right or right to left. When you leave the image, it will go back to its original position.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a client who's requesting using oauth on their site so users can
I have a client that wants an app that will detect the persons location
I have got a simple flex client requesting some data from a php script.
I have a client who is requesting that we give them an MSI file
I have a client requesting a very simple program that stores basic information that
If I have a resource that a requesting client doesn't have access to but
I have a client that wants to be able to select from a playlist
I have a client who is requesting an HTML-formatted email to promote an event.
We have an ASP.NET MVC website that a customer is requesting Active Directory single
I have client/server applications and a very simple protocol for communication. More precisely, it's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.