Skip to main content

Microsoft Silverlight

Why is System.Windows.Media.VisualBrush missing?RSS Feed

(0)

Alex Ivanov
Alex Ivanov

Member

Member

18 points

27 Posts

Why is System.Windows.Media.VisualBrush missing?

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
Bill Reiss

Contributor

Contributor

4840 points

919 Posts

Silverlight MVP

Re: Why is System.Windows.Media.VisualBrush missing?

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?


Bill Reiss, Coauthor of Hello! Silverlight 3
My blog (rss feed)

y_makram
y_makram

Contributor

Contributor

6172 points

1,233 Posts

Re: Why is System.Windows.Media.VisualBrush missing?

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.

Thanks
Yasser Makram
http://www.silverlightrecipes.com
_____
Dont forget to click "Mark as Answer" on the post that helped you. If your question has not been answered, please post a followup question.

Alex Ivanov
Alex Ivanov

Member

Member

18 points

27 Posts

Re: Why is System.Windows.Media.VisualBrush missing?

 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 Confused
 

mikeb123
mikeb123

Member

Member

100 points

47 Posts

Re: Re: Why is System.Windows.Media.VisualBrush missing?

Oh, I couldn't agree more. Thanks for posting this question.

Dear Microsoft, can we expect this in a future drop? thanks

Kevgor
Kevgor

Member

Member

224 points

77 Posts

Re: Re: Why is System.Windows.Media.VisualBrush missing?

I add my vote for visualbrush too. It's very tough to recreate SVG's "patterns" without visualbrush

Kevgor

johndd
johndd

Member

Member

260 points

76 Posts

Re: Re: Why is System.Windows.Media.VisualBrush missing?

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
tamirk

Member

Member

100 points

23 Posts

Re: Why is System.Windows.Media.VisualBrush missing?

 You can try my implementation of VisualBrush. This is not final, but it works.

Tamir http://khason.net
If your question was answered, mark the answer

rootmeet
rootmeet

Member

Member

2 points

1 Posts

Re: Re: Why is System.Windows.Media.VisualBrush missing?

How do you create reflaction of ListBox? Do I need to use ImageBrush/VideoBrush?as there is no VisualBrush in Silverlight Sad

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
Tim Dawson

Participant

Participant

1130 points

218 Posts

Re: Re: Why is System.Windows.Media.VisualBrush missing?

You can't.


Microsoft MVP
Controls for Silverlight, WPF and Windows Forms at http://www.divelements.co.uk

yhua045
yhua045

Member

Member

6 points

3 Posts

Re: Why is System.Windows.Media.VisualBrush missing?

 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

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities