You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on Fluent we ran into an issue when we were trying to use LinearGradientBrush alongwith RelativeTransform and MappingMode set to Absolute.
In the issue, when we use a LinearGradientBrush defined with above properties and apply it on controls with different heights, the position of linear gradient remains the same from top, rather than from bottom.
Moreover, if a control with a different height gets processed / styled first, the position of linear gradient is now different.
The first control using the brush gets the correct styling, however subsequent controls where this is used don't see the correct style. This seems like a caching issue in the sense that once the brush is evaluated for the first control, the values of gradient stops are cached by the brush and they are not being reevaluated for other controls where the brush is used.
Reproduction Steps
Here are the steps to repro the issue :
Define a LinearGradientBrush like following in your resources :
Description
While working on Fluent we ran into an issue when we were trying to use LinearGradientBrush alongwith RelativeTransform and MappingMode set to Absolute.
In the issue, when we use a LinearGradientBrush defined with above properties and apply it on controls with different heights, the position of linear gradient remains the same from top, rather than from bottom.
Moreover, if a control with a different height gets processed / styled first, the position of linear gradient is now different.
The first control using the brush gets the correct styling, however subsequent controls where this is used don't see the correct style. This seems like a caching issue in the sense that once the brush is evaluated for the first control, the values of gradient stops are cached by the brush and they are not being reevaluated for other controls where the brush is used.
Reproduction Steps
Here are the steps to repro the issue :
Expected behavior
In respect to the above example, every control no matter the height should have a red color at the bottom of the border.
Actual behavior
The brush is getting cached according to the first brush and gradient stops are not being calculated again.
Regression?
Don't know. Looks like a long standing issue.
Known Workarounds
Can avoid using Absolute MappingMode for the brush.
Impact
No response
Configuration
Other information
I discussed this issue with @miloush around half an year ago, but raising the issue got delayed from my end.
The text was updated successfully, but these errors were encountered: