In Windows Forms, I would go BackgroundImage and just select it from the comboBox. But here there is no such property.
How would I go about this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use an ImageBrush for the Window.Background property:
In general, when thinking about “how do I fill in an element or part of an element” (whether a window background, a text block foreground, or whatever) the answer will be a Brush, and WPF allows you to interchangeably use a solid brush, gradient brush, image brush, video brush or whatever. So you will be looking for the unified Background and Foreground properties rather than separate BackgroundColor, BackgroundGradient, BackgroundImage, BackgroundVideo etc. properties as you would have done in WinForms.