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 8165987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:42:19+00:00 2026-06-06T19:42:19+00:00

I have placed an Image as a button in my App and I want

  • 0

I have placed an Image as a button in my App and I want to change the Image on clicking the button and If I leave it has to regain its original Image. Is it possible in phone 7?

  • 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-06-06T19:42:22+00:00Added an answer on June 6, 2026 at 7:42 pm

    add two namespaces

    using System.Windows.Resources;
    using System.Windows.Media.Imaging;
    

    create two events for mouse enter and mouse leave

    private void btn_back_MouseEnter(object sender, MouseEventArgs e)
        {
            Uri myfile = new Uri("image.png", UriKind.Relative);
            StreamResourceInfo resourceInfo = Application.GetResourceStream(myfile);
            BitmapImage myimage = new BitmapImage(myfile);
            myimage.SetSource(resourceInfo.Stream);
            btn_back.Source = myimage;
        }
        private void btn_back_MouseLeave(object sender, MouseEventArgs e)
        {
            Uri myfile = new Uri("image.png.png", UriKind.Relative);
            StreamResourceInfo resourceInfo = Application.GetResourceStream(myfile);
            BitmapImage myimage = new BitmapImage(myfile);
            myimage.SetSource(resourceInfo.Stream);
            btn_back.Source = myimage;
        }
    

    And the xaml file is

          <Image Canvas.Left="10" Canvas.Top="17" x:Name="btn_back" Source="/NewUIChanges;component/Images/back_normal.png" Stretch="Fill"  MouseLeftButtonUp="img_cnvstop_MouseLeftButtonUp" MouseEnter="btn_back_MouseEnter" MouseLeave="btn_back_MouseLeave" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in my app i have placed a button called Add Photo, when the user
I have a image button placed for each row of a datagrid? using item
I have placed an image on the master page. I see the image at
I have an image which is placed in the middle of the screen all
I have a small (100x80) overlay image which will be placed at x=40, y=50
I want to draw image in place where I click. i have this code:
in my app i have a list view. Each list consists of a image,
I have two activities: one displays an image and a button, the other displays
I have placed a pause button in UI, where when the user clicks the
I have a button and I want when I click on it the flag.png

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.