Jump to content
LaunchBox Community Forums
shinra358

Need Help with this Gradient Xaml Code Please

Recommended Posts

http://s6.postimg.org/aeq4wy6pp/Clipboard01d.jpg
<LinearGradientBrush EndPoint="4,0" MappingMode="RelativeToBoundingBox" StartPoint="0,0"> <GradientStop Color="Black"/> <GradientStop Color="Transparent" Offset="2"/> </LinearGradientBrush>
How do I make that gradient go from black to clear so that the background image can be seen perfectly under the supposed transparent color without discoloration? Currently is looks like black to white.

Share this post


Link to post
Share on other sites
Can you replace that gradient with an image? An image from Photoshop might be what you're looking for. Past that, I don't really know the code. Visual Studio I know makes things a lot easier to work with.

Share this post


Link to post
Share on other sites
Can't quite remember how to reference an image from a directory. Everytime I load a xaml into visual studio, I don't see anything. Maybe I forgot how to use it? :P

Share this post


Link to post
Share on other sites
As far as I can tell without testing it, that XAML should work. All I can figure is maybe the transparency isn't working properly because of what's underneath it or over top of it...or something. Where are you putting it?

Share this post


Link to post
Share on other sites
You probably already know, but there is an example of doing exactly that in the CoverFlow with details view.

Share this post


Link to post
Share on other sites
I copy and pasted that code but when I put it over the image, it's just like the pic in first post. But if I use an image to do it like this:
<Image Source="troll.png"/>
Where should the png be? In same location as the xaml or in location of bigbox exe?

Share this post


Link to post
Share on other sites
I'm still working on figuring out relative paths. Several people have noted that they can't seem to get relative paths working, so I have that on my list to figure out. For now you'd have to do the complete, rooted path, unfortunately, but I'll get it figured out soon. I'm confused about the pic in the first post, though. You mentioned that the gradient was white but I don't see any white in the pic...can you explain?

Share this post


Link to post
Share on other sites
White is to the right. That white color is supposed to be transparent. But it's a transparent white. The image is not that color. Im trying to make that image shine through as it's original color. The black looks good but it's supposed to fade into the pure image but instead the image is whitish. This is the original image. Compare the coloring and see how the op pic is whitish to the right:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...