Questions tagged [brushes]

47 questions
3
votes
1 answer

WPF: How set active titlebar color to window background?

I have a WPF window without Titlebar and border. So I want change windows background based on it is active or not. I writed code below but I got message Cannot implicitly convert type 'System.Drawing.Brush' to 'System.Windows.Media.Brush'. Can you…
NoName
  • 7,940
  • 13
  • 56
  • 108
3
votes
1 answer

Preventing deformation in XAML Grid's background when resizing

I am writing a brush in XAML that I can use to paint the background of a Grid to create a banner. It looks like this: I want the brush to "stretch" with the Grid when the Window resizes, but I do not want the center angles to deform. I only need…
sourcenouveau
  • 29,356
  • 35
  • 146
  • 243
2
votes
1 answer

PhotoShop Define Brush Preset

I'm trying to make a brush that gives a sparkle effect. It's just a circle brush with a cross in the middle. Any way, when I try to define the brush preset, it says "Could not complete the command Define Brush Preset because the selected area is…
ShoeLace1291
  • 4,551
  • 12
  • 45
  • 81
2
votes
1 answer

What is the best way to copy / clone brushes?

Before drawing a shape on a canvas I have a preview that displays how the shape will look. I can adjust the opacity and then draw the shape. I may then wish to draw a second shape with a different opacity. My problem is that altering the opacity…
descf
  • 1,302
  • 1
  • 12
  • 31
2
votes
1 answer

C# Fill out a Rectangle with points

Hi I want to Fill out a Rectangle. Normally i can use: g.FillRectangle(Brushes.Green, x1, y1, x2, y2); But I don't want to fill it completly out with a green color, I want to fill it out with points So i want it: One point black, one point green,…
Chuck
  • 139
  • 2
  • 3
  • 13
2
votes
1 answer

WPF: looking for list of each control's states and brushes

Is there a list somewhere of all the common states for each control? We're restyling them and it would be nice to not have to hunt through each control to figure this out. Basically a list like: Button: Disabled, Hover, Pressed, Selected, Focus,…
dex3703
  • 2,077
  • 4
  • 28
  • 45
2
votes
2 answers

WPF change background of a control with an attached property

i need to change the background of labels and buttons when a boolean variable is true (back to default color on false). so i wrote an attached property. it looks like this so far: public class BackgroundChanger : DependencyObject { #region…
el-nino
  • 399
  • 9
  • 26
2
votes
2 answers

Convert int to System.Drawing.Brushes.SomeColor?

I imagine those System.Drawing.Brushes.SomeColor can eventually break down to some numbers, or vectors perhaps, such as 0 is black and 255 is white in a 8-bit gray scale representation. So I am wondering is there any chance an integer can be…
Ono
  • 1,357
  • 3
  • 16
  • 38
2
votes
1 answer

Loop through Brushes in Silverlight to get all possible colors

I have a class that worked on a previous project i had that looped through all the available colors in the WPF application, this is shown below; public class ListOfColors { public List SelectableColours; private…
Win
  • 2,593
  • 3
  • 25
  • 35
1
vote
0 answers

Multiple No Collision Brushes in D3js (V4)

I'm doing a Multiple Collision Brushes in D3js in version 4 using this example: http://bl.ocks.org/jssolichin/54b4995bd68275691a23 (version 3). I want to apply to this example: https://bl.ocks.org/NGuernse/4c75a051154cbe08bf80cddefefae22a. I almost…
1
vote
1 answer

Brush MVVM Binding does not give named color

I have a MVVM binding for Border background where in I read Color names from a file in String format and convert them to Brush using the code: Brush b1 = new SolidColorBrush((Color)ColorConverter.ConvertFromString("Red"); myItem.Background =…
RDV
  • 957
  • 13
  • 28
1
vote
1 answer

Ellipse default Fill color

I use an ImageBrush to fill an Ellipse. Since I use uniform stretching my image doesn't fill the whole area of the ellipse and the empty space is transparent. I couldn't find a way to…
serine
  • 1,338
  • 14
  • 24
1
vote
5 answers

OpenGL equivalent of GDI's HatchBrush or PatternBrush?

I have a VB6 application (please don't laugh) which does a lot of drawing via BitBlt and the standard VB6 drawing functions. I am running up against performance issues (yes, I do the regular tricks like drawing to memory). So, I decided to…
1
vote
1 answer

Silverlight Drawingbrush

I'm new in Silverlight, and I'm looking for something like a drawing brush on Silverlight without success. I saw Tamir Khason blog on building a drawing brush in Silverlight and i download the code without any success i'm taking about the next…
Peleyal
  • 11
  • 3
0
votes
0 answers

gimp brush folder error

Trying to paste into a new brush, I get the following error message: Error while executing script-fu-paste-as-brush: Error: Procedure execution of file-gbr-save failed: Could not open 'C:\Users\username/brushes/mybrush2.gbr' for writing: No such…
Erel Segal-Halevi
  • 33,955
  • 36
  • 114
  • 183