Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: XAML WPF template
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:02am
Comments
Sergey Alexandrovich Kryukov at 3-Jan-13 18:24pm
   
I hope, "repeat-y" was just for analogy, right? :-)
—SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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  
v2
Comments
Espen Harlinn at 3-Jan-13 18:45pm
   
Nice :-D
Sergey Alexandrovich Kryukov at 3-Jan-13 18:56pm
   
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
0 OriginalGriff 278
1 Maciej Los 210
2 Nguyen.H.H.Dang 190
3 Peter Leow 175
4 Sergey Alexandrovich Kryukov 150


Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid