Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Is it possible to set image as background to textbox
Yes its possible check below,
<TextBox.Background> <ImageBrush ImageSource="Rose.jpg" /> </TextBox.Background>
You can also set the image in the cs code:
ImageBrush textImageBrush = new ImageBrush(); textImageBrush.ImageSource = new BitmapImage(new Uri(@"...\1.jpg", UriKind.RelativeOrAbsolute)); textImageBrush.AlignmentX = AlignmentX.Left; textImageBrush.Stretch = Stretch.None; myTextBox.Background = textImageBrush;
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.