Questions tagged [visualbrush]

84 questions
0
votes
1 answer

wpf grid background with image brush and visual brush combined

I am trying to set an image as a background of my window. I want to apply a gradient opacity mask over the window, and have the image tiled. So far, I can get either or, but not both. Here's my lame attempt at this:
konrad
  • 3,544
  • 4
  • 36
  • 75
0
votes
1 answer

Change Background color to a Visual pattern based

I have a list of elements (simple buttons with plain textblock) which are color coded based on the list item content. User can update the Listitem and thus listitem color should change. For certain listitem background colors like "Red", I want to…
RDV
  • 957
  • 13
  • 28
0
votes
1 answer

Can controls rendered within a wpf Viewport3D using a VisualBrush fire their specific events?

I'm trying to render a Button on a GeometryModel3D by using a VisualBrush. Is there a way I can handle the button's click event directly? (or is it that the VisualBrush only renders the image of a button and I am supposed to use the VisualTree in…
Cris
  • 1
  • 1
0
votes
1 answer

Multi Coloured Geometry Control Background

I'm trying to create some kind of brush that achieves the affect shown in the picture. It is intended for a control's Background. I can achieve the affect using VisualBrush with the above image as the source but I'm applying it to ~100 controls and…
0
votes
1 answer

MVVM- Is there any way I can bind the visual of a visual brush to another window?

I have a settings window and am trying to set it up so that there is a live preview what the main window will look like with the current settings. Here is a picture of what the settings dialog looks like at the moment. The big black rectangle will…
Justin
  • 2,399
  • 4
  • 31
  • 50
0
votes
1 answer

VisualBrush makes Visual blurred

i have a problem with the WPF VisualBrush. Here you find two images from my application. The bigger on is a image which shows a control with text. The smaller one is a extract from the first on who i use a visual brush to make it. My problem is,…
Lutze
  • 76
  • 8
0
votes
1 answer

Double Border with a VisualBrush in WPF

I'm curious if anyone knows of a way to easily get a double border effect in WPF similar to what you see in the selected items in Windows Explorer in Windows 7. If you look closely, you'll notice that the selected item has a dark border, a lighter,…
dustyburwell
  • 5,755
  • 2
  • 27
  • 34
0
votes
1 answer

Set a boundary for the VisualBrush in WPF

There is a blue rectangle that is filled with a custom VisualBrush (left image). A line is passing through the rectangle. How can I trim the brush to achieve the shape in right image.
Vahid
  • 5,144
  • 13
  • 70
  • 146
0
votes
1 answer

VisualBrush with fading margins in WPF

I'm trying to create a VisualBrush with a hatched pattern that would fade at the top and bottom margins. While I had no problem with hatch itself:
Eugen
  • 2,934
  • 2
  • 26
  • 47
0
votes
1 answer

Why the Visual brush that is based on the Grid shows horizontal and vertical grid lines

If you test the code below and any bright image you will see 4 columns and 4 rows painted over the used image. I need this configuration to use for some kind of effect. Basically I made it and it works but these grid lines I would like to remove and…
Patrik
  • 1,286
  • 1
  • 31
  • 64
0
votes
2 answers

Get the color at an offset in a Rectange with a linear gradient

I have a Rectangle with the following XAML:
Ranjith Venkatesh
  • 1,322
  • 3
  • 20
  • 57
0
votes
1 answer

VisualBrush size and stretch problems

I would like to export a grid (whit all his children) to a PNG. The problem is that some of these children are outside of the grid. Here is my code: VisualBrush sourceBrush = new VisualBrush(MyGrid); DrawingVisual drawingVisual = new…
Ben
  • 3,972
  • 8
  • 43
  • 82
0
votes
1 answer

Is it possible to create VisualBrush from String?

I think my question is selfexplanatory but to elaborate a little bit here is the case. I want to assign value to Brush property at runtime. I am assigning it VisualBrush whose key I get from db…
Nikhil Agrawal
  • 47,018
  • 22
  • 121
  • 208
0
votes
2 answers

Use an image as polyline stroke outline

I have a paint-like application, when I move the mouse it will draw a line by polyline. Now I want to replace the polyline outline with a pattern image, so when I move the mouse in the canvas it repeats that image as polyline's outline. I've already…
Max
  • 3
  • 2
0
votes
1 answer

Preview of a window (Visualbrush) that is not visible

I've created a window dynamically that's is in memory but is not visible yet. In other window I want to show a little preview of this window. I'm triying using a visualbrush to achieve this, setting the visual property of the visualbrush. It works…
Jonathan
  • 11,809
  • 5
  • 57
  • 91