Saturday, 15 August 2015

wpf controls - WPF Image Uniform to None -


I want to spread my image uniform when its size is smaller than the original if there is enough space, then I Do not want to drag. I'm using Image Control:

  & lt; Image Name = "Image Box" Stretch = "Uniform" Size changed = "ImageBox_SizeChanged_1" />   

My event handler:

  Private zeros image box oxidimes (object sender, size change event ARG E) {if (original move size == empty) returns ; If (ImageBox.RenderSize.Width> BasicallyNavid Width & ImageBox.RenderSize.Height> Original ImageHeight) ImageBox.Stretch = Stretch.None; And the imagebox. Stretch = Stretch Uniform; }   

When I load the image is OK, next time I will resize the window, so there is enough space to show the whole image and scaling is not necessary, the image starts with the blink is. Uniform I think)

Any advice?

I think that you are looking for property you can try < Pre> & lt; Image Name = "Image Box" Stretch = "Uniform" Stretch Direction = "DownOnly" />

Without your event.

No comments:

Post a Comment