Note that there are some explanatory texts on larger screens.

plurals
  1. POWindows Phone 7 - Image Color Overlay from URL
    primarykey
    data
    text
    <p>In my Windows Phone 7.1 App, I have a fully functioning <code>ListBox</code> which displays data from a web service. In the <code>ListBox</code> I was able to put an image and bind the image source to a value returned from the web service using the following <code>xaml</code>:</p> <pre><code>&lt;Image Source="{Binding WebImageUrl}" Width="60" Height="60" /&gt; </code></pre> <p>This works great. But now I am trying to overlay the image with another color, and to do that I am following the SO question posted <a href="https://stackoverflow.com/questions/3950750/how-can-i-change-the-color-of-an-image-in-silverlight-wp7-color-mask">here</a>. This also works great IF the image explicitly stated. And it does NOT work if I try to bind the url.</p> <p>For instance, the code:</p> <pre><code>&lt;Rectangle Fill="Red" Width="60" Height="60"&gt; &lt;Rectangle.OpacityMask&gt; &lt;ImageBrush ImageSource="http://someurl.com/repository/images/icon100.png"/&gt; &lt;/Rectangle.OpacityMask&gt; &lt;/Rectangle&gt; </code></pre> <p>works. BUT, the code:</p> <pre><code>&lt;Rectangle Fill="Red" Width="60" Height="60"&gt; &lt;Rectangle.OpacityMask&gt; &lt;ImageBrush ImageSource="{Binding WebImageUrl}"/&gt; &lt;/Rectangle.OpacityMask&gt; &lt;/Rectangle&gt; </code></pre> <p>does not. The code compiles file, but Visual Studio throws a parsing error.</p> <p><strong>Is there any way to have ImageBrush.ImageSource bind to a string???</strong></p> <p>Any thoughts would be much appreciated. I've been at this for a while to no luck.</p> <p>Cheers, Brett</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload