窗口形式wpf上的背景图像(repeat-y) [英] background image (repeat-y) on window form wpf

查看:80
本文介绍了窗口形式wpf上的背景图像(repeat-y)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置一个背景图片,只在y上重复垂直。



我的代码是

I want to set a background image and repeat only vertical on y.

my code is

<Window.Background>
    <ImageBrush ImageSource="images/window_bg.png" 

    ViewportUnits="Absolute"

    Viewport="0,0,186,2" 

    TileMode="FlipY"

    Stretch="UniformToFill"

    AlignmentX="Left"

    AlignmentY="Top" />
</Window.Background>





出了什么问题



What''s going wrong

推荐答案

这看起来像答案:http://stackoverflow.com/questions/1782979/wpf-how -do-i-create-a-background-that-repeats-horizo​​ntal-without-scalling [ ^ ]。



你想要repeat-y,而不是x,在代码中翻转x和y。



请试试。



-SA
This looks like the answer: http://stackoverflow.com/questions/1782979/wpf-how-do-i-create-a-background-that-repeats-horizontally-without-scalling[^].

As you want "repeat-y", not x, flip x and y in the code.

Please try.

—SA


这篇关于窗口形式wpf上的背景图像(repeat-y)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆