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 Blend - does anyone know the keyboard/mouse actions that you use to do this?
...
Does anyone know if there is an equilant attribute of SVG's "gradientUnits=userSpaceOnUse" in WPF for a LinearGradientBrush? I can't seem to find this.
If not, does anyone know about how to calculate it in (C# or VB.NET)? For example if I have a StartPoint of 0,0 and EndPoint of 1,1 on a Rectangle that is 100x100, the angle is 45 degree...
Hi,
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 line at y-pixel 1, than a yellow one at y-pixel 2 than a red one at y-pixel 3. These...
I have a grid containing rows flagged with different priorities. I want to color the high priority rows red, low ones blue, etc.
I'd like to set the shade based on a mathmatically calculated gradient rather than arbitrarily assigning colors to specific priorities. How can I extract a single color from a single point along gradient?
...
I am looking for a way to set a gradientbrush as the background for a listbox item. I have a DataTemplate defined and have specified a gradient brush but it always appears as the listbox background (i.e. it never shows as a gradient brush).
I have been able to set the background of the listbox itself, and I can set the listboxitem's ...
My question is similar to this one.
However, the answer in that thread does not work for me, because I'm using the LinearGradientBrush for an opacity mask.
I've got a grid with three rows:
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="*" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
...
I have to write several small vertical gradients (on a loop) and so I think it's faster to re-use an existing LinearGradientBrush (correct?)
But this isn't what I expected to happen...
Drawing2D.LinearGradientBrush myBrush = new Drawing2D.LinearGradientBrush(new Rectangle(0, 0, 200, 200), Color.Red, Color.Black, Drawing2D.LinearGradi...
Is it possible to animate the StartPoint or EndPoint of a LinearGradientBrush? If so, what is the type of the Storyboard object used to animate the Points, as when I try the following I get "0,1" is not a valid value for Double, and I do realize I shouldn't be using the DoubleAnimationUsingKeyFrames type.
Current Code:
<UserControl.Tri...
Hi All--
I'd like to apply a Brush (LinearGradientBrush in this case) to two or more objects (TextBlocks) at once. The effect that I'd like is something like this:
Edit
I cannot simply apply the same brush to both objects, as this will make both of them start red and go to blue (instead of the second one starting at a shade of purpl...