Click here to Skip to main content
Sign Up to vote bad
good
See more: XAMLWPFtemplate
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
Posted 3 Jan '13 - 3:02

Comments
Sergey Alexandrovich Kryukov - 3 Jan '13 - 18:24
I hope, "repeat-y" was just for analogy, right? :-) —SA

1 solution

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
  Permalink  
Comments
Espen Harlinn - 3 Jan '13 - 18:45
Nice :-D
Sergey Alexandrovich Kryukov - 3 Jan '13 - 18:56
Thank you, Espen. Happy New Year! —SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 8,376
1 OriginalGriff 6,571
2 CPallini 3,533
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid