Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Why is System.Windows.Media.VisualBrush missing?
10 replies. Latest Post by yhua045 on May 11, 2009.
(0)
Alex Ivanov
Member
18 points
27 Posts
07-09-2007 10:15 AM |
I noticed that Silverlight includes Brush, ImageBrush, LinearGradientBrush, RadialGradientBrush, and even the fancy shmancy VideoBrush. However, it does not include VisualBrush?!
It is essential for what I am trying to do to be able to fill a surface with visual elements. Microsoft, why didn't you guys include that class in Silverlight and are you planning to do so?
Bill Reiss
Contributor
4840 points
919 Posts
07-09-2007 10:27 AM |
I agree, actually if you had VisualBrush without having some of the others, you could still do everything you would want to. The absence of the visualbrush makes things a lot more complicated.
Alex, would it be possible to do what you're trying to do with clip regions on the canvas?
y_makram
6172 points
1,233 Posts
07-09-2007 10:43 AM |
I can not agree more, VisualBrush is a great feature of WPF that we really miss in Silverlight, though you can work around its absence, but things would be much easier with it.
07-09-2007 11:01 AM |
What I am trying to do is a basic perspective projection of a Canvas and its elements. I can see how you can get around the absence of VisualBrush in 2D, but for my purposes I don't really see any way around it. Please let me know if you can think how to create a distorted transformation without using VisualBrush.
Bill,
Canvas.Clip would clip the image to the boundaries, but what I am trying to do is stretch it proportionately to the dimensions of the boundaries.
Thanks for your replies, Alex
PS Although I wish I got a response from Microsoft, too
mikeb123
100 points
47 Posts
07-09-2007 4:44 PM |
Oh, I couldn't agree more. Thanks for posting this question.
Dear Microsoft, can we expect this in a future drop? thanks
Kevgor
224 points
77 Posts
07-11-2007 4:38 PM |
I add my vote for visualbrush too. It's very tough to recreate SVG's "patterns" without visualbrush
johndd
260 points
76 Posts
07-12-2007 10:25 AM |
I suspect we have VideoBrush instead of VisualBrush. With VisualBrush supported there wouldn't be much need for VideoBrush. Please Microsoft, we need some way to copy and manipulate content on screen. VisualBrush would be awesome. If we can't have VisualBrush can we at least have RenderTargetBitmap and a way to create an image brush from that so we can take snapshots.
tamirk
23 Posts
05-07-2008 5:07 AM |
You can try my implementation of VisualBrush. This is not final, but it works.
rootmeet
2 points
1 Posts
04-13-2009 4:16 AM |
How do you create reflaction of ListBox? Do I need to use ImageBrush/VideoBrush?as there is no VisualBrush in Silverlight
I am trying to create example http://channel9.msdn.com/posts/Nichop/Real-world-WPF-Introduction-to-Blend-Part4/ in Silverlight. In this example your can see listbox reflection created at bottom half.
Tim Dawson
Participant
1130 points
218 Posts
04-13-2009 5:52 AM |
You can't.
yhua045
6 points
3 Posts
05-11-2009 10:44 PM |
Hi Tamirk,
Can I pass in a TextBlock to this VisualBrush just as what we did in WPF?
Could you please give me some idea if I want to "Draw" a text in silverlight, how I can do that?
All I want to do is to put a text under the X-axis of a 3D bar chart. So when user rotates the chart, the persepctive of the text gets changed as well.
Thanks in advance