Gradient Transform Tool Affects Both Stroke & Fill
- Hey, I just noticed that the gradent transform tool affects both the stroke and the fill for a particular shape ... regardless of what is selected.
That surprised me. Is that a bug?
I would expect that the gradient transform tool would only affect whatever was selected ... so that the stroke and the fill could have different gradient transforms.
Has anyone else noticed this?
Answers
- Hi Cory,
FWIW, this behavior has been the same in E3, Acrylic and Expression Design and seems counter intuitive. The gradients for the stroke and the fill on the same object can be different (colors, and linear vs circular), however the Gradient Transform affects both. The workaround is to create a duplicate object in place and assign just a fill to one and just a stroke to the other; group to retain position. HTH
Cheers,
~Fred- Marked As Answer byCory Plotts Monday, June 15, 2009 1:39 PM
All Replies
- Hi Cory,
FWIW, this behavior has been the same in E3, Acrylic and Expression Design and seems counter intuitive. The gradients for the stroke and the fill on the same object can be different (colors, and linear vs circular), however the Gradient Transform affects both. The workaround is to create a duplicate object in place and assign just a fill to one and just a stroke to the other; group to retain position. HTH
Cheers,
~Fred- Marked As Answer byCory Plotts Monday, June 15, 2009 1:39 PM
Thanks for your reply Fred.
About your suggested workaround: note that the exported xaml that would then get spit out ... would also then be two different shapes ... that could/maybe should be optimized by replacing it with one shape with a stroke and/a fill ... but as you state, it is a workaround.
One idea for an enhancement is to provide a link icon (kind of like the link icon for opacity stroke and fill) ... that would allow you to break the behavior of the gradient transform tool from applying to both the stroke and the fill ... to only applying to the either the stroke or the fill (i.e. what is selected). This would give you the best of both worlds.
(And my suggestion above ... illustrates that I've never understood the difference between the brush tool and the gradient transform tool. They both seem to affect both the stroke and the fill of whatever shape is selected ... they just provide a different way to modify the gradient.)
Here's another idea: let's move the gradient tools from Blend 3 ... into Design. Those rock ... and are SO intuitive.- Yeah, Cory, I'm with you. There are tools in Blend that would be awesome to have in Design. I recommended that once but I don't know if it's planned for the future or not.
Would it be good for you to flatten the resulting image before exporting to XAML? That would certainly reduce the code significantly.
Hey! I remember you from Twitter! :-)
Welcome to our forums, Cory!
Annie - Hi Annie,
I remember you from Twitter too! :)
Ok, I have to confess ... I'm a software engineer masquerading as a designer. Heh heh. :) (I often play an Integrator role on projects.)
You just tapped out my knowledge. The only flattening I know ... is when you flatten multiple layers into one by saving the vector art as a raster resource (png, jpg, etc.).
We typically use the vector artwork (in a WPF application) and so don't usually create many raster images anymore.
Is there a 'flattening' that I am not aware of?
Cory - Nope, that's the flattening I was referring to.
If you group the two items they would be treated as one item inside a Viewbox, but that's only if you export the XAML to a XAML WPF Canvas. Exporting to a XAML Silverlight Canvas would result in a canvas within the main canvas, which I guess would also be one canvas item. That doesn't work for you?
Annie Ok, in my efforts as Integrator, I often receive an .ai or a .design file from our designer. In the case of the .ai file, I fix up any conversion issues that I find. Eventually, I export to either a WPF ResourceDictionary or to a WPF Canvas depending on whether I want brushes or shapes/paths on a Canvas.
At that point, I go through the XAML, cleaning it up as necessary.
What do I mean by the above? Well, sometimes I see that I can combine two shapes into one (like the case above where the designer had to create two different shapes to compensate for a limitation in the tool). Other times, it might be converting the BitmapEffect XAML that gets spit out ... into the GPU rendered Effect XAML that I need. Or, it might be something else entirely.
So, your above suggestion, of course, works ... I just wish that there weren't two shapes in the XAML ... when there really only needs to be one shape.

