---
title: "How to change image dynamically in wpf?"  
description: "How to change image dynamically in wpf?"  
author: "Anonymous User"  
published: 2013-09-03  
updated: 2013-09-03  
canonical: https://www.mindstick.com/forum/1422/how-to-change-image-dynamically-in-wpf  
category: "wpf"  
tags: ["wpf"]  
reading_time: 1 minute  

---

# How to change image dynamically in wpf?

myImage.Source = new BitmapImage(new [Uri](https://www.mindstick.com/interview/271/what-is-the-difference-between-url-and-uri)("/folder/imagename.png", UriKind.Relative));

This used to work in [WPF](https://www.mindstick.com/forum/304/wpf) [applications](https://www.mindstick.com/articles/12847/how-to-choose-the-right-ethernet-cable-for-industrial-applications) for [Windows](https://www.mindstick.com/articles/311752/how-to-install-and-use-the-google-wifi-software-on-a-windows-or-mac-computer) 7, but there, in Windows 8, I got an [error](https://yourviews.mindstick.com/view/88527/fixing-quickbooks-error-4120-reinstalling-vs-repairing)

Thanks in advance.

## Replies

### Reply by Sumit Kesarwani

Hi Tanuj,\

The Image.Source property is of type ImageSource. Therefore, try the following example:

myImage.Source = "/YourApplicationName;component/folder/imagename.png";


---

Original Source: https://www.mindstick.com/forum/1422/how-to-change-image-dynamically-in-wpf

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
