---
title: "How to create image water mark in textbox using wpf?"  
description: "How to create image water mark in textbox using wpf?"  
author: "Anonymous User"  
published: 2013-08-08  
updated: 2013-08-09  
canonical: https://www.mindstick.com/forum/1356/how-to-create-image-water-mark-in-textbox-using-wpf  
category: "wpf"  
tags: ["wpf"]  
reading_time: 1 minute  

---

# How to create image water mark in textbox using wpf?

How to create [image](https://www.mindstick.com/articles/23551/an-investigate-distinctive-seafood-restaurant-for-your-image-stamp-character) [water](https://yourviews.mindstick.com/story/1535/countries-with-the-worst-drinking-water) mark in [textbox](https://www.mindstick.com/forum/12714/dynamic-textbox-in-gridview) using [wpf](https://www.mindstick.com/forum/304/wpf)?

## Replies

### Reply by shreesh chandra shukla

Hi !

You can set the background image in textbox and write the below code in textbox text change event:-

```
private void txtSearch_TextChanged(object sender, TextChangedEventArgs e)        {            if (txtSearch.Text != "")            {                this.txtSearch.Background = null;            }            else            {                ImageBrush mybrush = new ImageBrush();                mybrush.ImageSource = new BitmapImage(new Uri("Image Path"));                this.txtSearch.Background = mybrush;            }        }
```

thanks


---

Original Source: https://www.mindstick.com/forum/1356/how-to-create-image-water-mark-in-textbox-using-wpf

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
