LinearGradientBrush is not working with StartPoint/EndPoint
See original GitHub issueHello! I’m trying to use . It’s working fine with horizontal gradient:
<LinearGradientBrush x:Key="BackgroundGradient">
<GradientStop Offset="0" Color="#C2E4F6" />
<GradientStop Offset="1" Color="#95CDEC" />
</LinearGradientBrush>
But when I’m trying to make vertical gradient, background becomes solid:
<LinearGradientBrush x:Key="BackgroundGradient" StartPoint="0,0" EndPoint="0,1" >
<GradientStop Offset="0" Color="#C2E4F6" />
<GradientStop Offset="1" Color="#95CDEC" />
</LinearGradientBrush>
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (17 by maintainers)
Top Results From Across the Web
WPF C# Animate Linear Gradient Brush start point or end ...
And my code for animation is this but not work without errors. How I can animate this property correctly? Storyboard story1 = new...
Read more >LinearGradientBrush.StartPoint Property (System.Windows ...
Gets or sets the starting two-dimensional coordinates of the linear gradient.
Read more >CompositionLinearGradientBrush Class
Gets or sets a value that indicates whether the gradient brush's positioning coordinates (StartPoint, EndPoint) are absolute or relative to the output area....
Read more >Gradient with setFill()? | Apple Developer Forums
Hello. I subclassed a UIView to do some drawing. Inside the view, I created a frame that takes only a part of the...
Read more >Gradient fill angle - Ask the community
Hi, I'm seeing an angle on gradient fill, even though I should not. Is it something I'm doing wrong or a bug?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Why not simply swap the default behavior? So “0,1” would be interpreted as a percentage (as it is in WPF, but adding the percentage sign would be optional), and “0px,1px” would be interpreted as pixels.
100%
equals to1.0
+RelativeUnit.Relative
while1
equals to1.0
+RelativeUnit.Absolute