Questions tagged [lineargradientbrush]

76 questions
0
votes
1 answer

WPF C# Animate Linear Gradient Brush start point or end point

How can you set the animation of "EndPointProperty" or "StartPointProperty" to animate LinearGradientBrush? I have this code in xaml:
Ares
  • 3
  • 2
0
votes
3 answers

Giving a stackPanel the same LinearGradientBrush as the toolbar has by default

I have two ToolBars side by side (I had to do that so I could align buttons right and left) But now, I have to add some text that can be aligned right left or center between both toolbars. I added the text in a TextBlock inside a StackPanel disposed…
Fjodr
  • 919
  • 13
  • 32
0
votes
1 answer

Silverlight LinearGradientBrush Color not correct

I want to use LinearGradientBrush to horizontal fill my Rectangle on canvas. My code:
whosea
  • 3
  • 1
0
votes
1 answer

Is it possible to retrieve the angle of a LinearGradientBrush in code?

I'm looking at the constructor for the LinearGradientBrush class and I see it has an override which takes a collection of GradientStops and a double as an angle. When I look at the properties of it, I can't find how to get the angle form the brush…
Will
  • 3,413
  • 7
  • 50
  • 107
0
votes
2 answers

wpf bind ellipse gradientstop color to ivalueconverter

I have bind an ellipse to a checkbox and an iValueConverter (this works ... Fill(see below)).
user1562809
  • 107
  • 9
0
votes
1 answer

Changing the StartPoint/EndPoint of a LinearGradient brush in Expression Blend UI

Seems like as really simple thing to do, but I just can't track it down in the help or online. I know how to change the XAML to set the StartPoint and EndPoint of a LinearGradient brush, but I don't know how you do it using the IDE in Expression…
Gordon Mackie JoanMiro
  • 3,499
  • 3
  • 34
  • 42
0
votes
2 answers

How to call my method in mainWindow for linearGradientBrush?

I have a problem. I would like to call my method in xaml (mainWindow) in LinearGradientBrush --> GradientStop So I would like to change color in background for an animation. I have a function which has several parameters as : public static…
0
votes
1 answer

Why doesn't setting the Foreground property of a RichEditBox to a LinearGradientBrush do anything?

I'm trying to set the foreground of a WinRT XAML RichEditBox to a linear gradient so that the text appears to fade to transparency at the top and bottom edges of the element. I've specified the LinearGradientBrush as follows:
user3651656
  • 185
  • 2
  • 9
0
votes
1 answer

LinearGradientBrush not behaving as supposed

I have a LinearGradientBrush defined for use in plotting a texture in a MeshGeometry3D, as follows. The idea is that values at the absolute ends of the brush should be plotted in Silver:
Rob Perkins
  • 3,088
  • 1
  • 30
  • 51
0
votes
1 answer

Changing the lineargradient offset colour of content template based on templatebinding background colour WPF

Ok so here's the problem. Am trying to figure out how to make this work: Consider the following ControlTemplate for creating a Custom Button:
0
votes
1 answer

How to paint a precise Gradient with LinearGradientBrush in C#?

I'm painting this object in C# using GDI and I need to have precise pixel painting. However, this is not working... I don't know if it matters but the object I'm painting is a ToolStrip, I'm doing a custom ToolStrip render. I drew a horizontal blue…
rfgamaral
  • 16,546
  • 57
  • 163
  • 275
0
votes
1 answer

WPF: LinearGradientBrush with Alpha not works in a Popup control?

I want to create a custom WPF dropdown menu, so I created a User control which contains a ToggleButton and a Popup control. The popup appears when I click on the button. Now I want to add a mouse hover effect on the menu items in the popup: but the…
Zsolt
  • 3,263
  • 3
  • 33
  • 48
0
votes
1 answer

LinearGradientBrush with gradientstops outside of the line

I'm trying to draw a waveform like the ones used on soundcloud.com in my WPF application I'm doing this by drawing multiple vertical lines What I want is that all the lines have the same color transition (so horizontally all pixels have the same…
Sjors Miltenburg
  • 2,540
  • 4
  • 33
  • 60
-2
votes
1 answer

Drawing a line that blends from one colour to another

In WPF, is there a way to draw a line (in any orientation) that blends from one colour to another? For example, I want to draw a line from point A to point B, where A is Red and B is Black. The line could be vertical, horizontal, or any…
wforl
  • 91
  • 9
-2
votes
1 answer

WPF gradual change in color

I am developing a simple game, using WPF. I need to change color of the brush gradually between blue, green, yellow, red, etc, without abrupt visible change in the color. Is there a way I can use the color values to achieve this? I tried using…