views:

64

answers:

1

Is there a way to put a clipping path on an ImageBrush in Silverlight (not an Image)? I don't see it available from Intellisense, but I'm wondering if there may be a way to do this.

+2  A: 

Yet another unpopular "No" answer. The answer is: there is isn't a way to do this.

One possible work around if its vital to create such a brush might be to use a WriteableBitmap. Render an Image using the original source plus the Clip onto a WriteableBitmap then use it as the source to an ImageBrush.

AnthonyWJones
Argh...man I'm finding SL to be limited. I was hoping there would be a way to do this.
Otaku
@Otaku: Limited in comparison to what? Silverlight needs to deliver a plugin and a set of libraries with a reasonable internet friendly foot print. There are also performance issues to consider, Silverlight cannot assume the same stance with regard to CPU usage that an Installed Windows app might take. On top that Silverlight apps need to work on both Windows and Mac unmodified. Altogether some heavy duty compromises would be necessary.
AnthonyWJones
Limited to itself. If an `<Image/>` can have a clipping path, I fail to see why an `<ImageBrush/>` can't have one. If it is something net new like making a Rich Text Box (`<rant>an RTB that was actually any good</rant>`), I could understand, but clipping path already exists for an extremely similar component.
Otaku