I would like to create a background for my window which is an image that I want repeated horizontally. So far I've tried with the ImageBrush, but this option repeats the image horizontally and vertically. Also, I don't want it to scale when user resize the window, as it makes the image look funny.
WPF: How do I create a background that repeats horizontally without scaling?
11.7k Views Asked by federubin At
1
There are 1 best solutions below
Related Questions in WPF
- WPF MessageBox Cancel checkbox check
- WPF multiple control property simultaneous changes
- ObservableCollection.CollectionChanged does not select the correct DataTemplate on ToolBar
- Telerik's WPF RadColorPicker NoColorText property not working
- How to automate UI interaction during acceptance test run
- Binding to "this.property" object in VisualStateMenager
- ContextMenu Closes Immediately
- Update ObservableCollection where the items are received from another List
- change content button with trigger
- WPF - How to highlight a combobox border when focused
- Wpf No Highlight on ListBoxItem for Touch Devices
- WPF WebBrowser how best to get Tag trees
- Make a class suitable for Property Change Notification
- WPF Comparing two datatables to find matching values
- how to create folder and file with datetime in wpf application
Related Questions in BACKGROUND
- X3DOM Inline Background skyColor
- CSS background property applied to HTML Input element within Table cell
- Changing background of button every second
- jQuery background animation - better performance
- Starting a ScheduledExecutorService from a servlet with a set of parameters
- Change button background with an action
- How to control multithreaded background jobs in for loop in shell script
- background is not working properly
- Fixed background adjusted to the monitor size
- How to print an ArrayList in processing and how to update the background
- Background image animation not working in Firefox
- How can i add an image as background in Chartjs?
- backgrounds Slideshow, but text scrolling
- Java replacing the background of an image
- Is there a way to override default CSS of HTML5 form validation messages
Related Questions in IMAGEBRUSH
- Change ImageBrush Imagesource programmatically with conditions (WPF)
- Select ImageBrush using VisualTreeHelper
- WPF apply margin on ImageBrush in Ellipse?
- Why ImageBrush raises an error but still shows up normally?
- How to set Background image's Scretch and TileMode in Code behind?
- 3D object with texture invisible
- Resize image for use as an image brush
- Set ImageBrush.ImageSource to Image in Windows 8 store app
- Grid Background Image using ImageBrush
- How to load a BitmapImage in MetroUI Dynamically
- Silverlight ImageBrush not rendering (with Bing Map Control)
- WPF: How do I create a background that repeats horizontally without scaling?
- How to display an image brush in the background of a border
- Drawing image to canvas in metro app
- Silverlight Button Background ImageBrush
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If what you want to do is tile an image horizontally as you would in CSS with the simple one liner "background-repeat: repeat-x" then after some (!) trial and error what you need in XAML is this:
Where the last 2 values on the Viewport attribute are the width of your image in pixels and then a very large number that is higher than your viewport height so that the image is not repeated in the Y direction within that height.