خرید بک لینک

Vote count: 1

I have a TextBox in which I want to add an image as background. The first try is this:

The result in this case is this:

enter image description here

If I use this code, that uses transform:

The result is this:

enter image description here

The image that I want to scale is this:

enter image description here

It seems that when it scales, reduce the size, but it crops the image to the size of the TextBox.

What I want to do it is scale the image to see the complete image, but I am not be able to get it.

asked yesterday

1 Answer

Vote count: 0

You need to use Uniform as value for the Stretch property. Like this:

Stretch="Uniform"

So, your code would look like this:

The Uniform value makes the image fill all the available space while keeping its original scale.

answered yesterday

برچسب: نویسنده: استخدام کار تاريخ: شنبه 19 فروردين 1396 ساعت: 3:52

صفحه بندی