A Major Silverlight PITA, and Two Annoying 3.0 Limitations(rapidapplicationdevelopment.blogspot.com)

submitted by LearLear(1195) 3 years, 8 months ago

Did you know Silverlight implements the Visible property as an enumeration not a Boolean? That leads the author to find two frustrating .Net 3.0 limitations: No ByRef Extension Methods, and no ByRef Automatic Properties.

2 comments |category: |Views: 159

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by rev4bartrev4bart(420) 3 years, 8 months ago 0

Nice overview of the problem in Silverlight. I always ask myself...why did they do it this way, this is one of those limitations :)

Reply

posted by ashmindashmind(775) 3 years, 8 months ago 0

ByRef extension methods would be very cryptic, since you do not expect c.DoSomething() to replace c.
IValueConverter solves Visiblity problem in WPF, I am not sure if Silverlight supports them, but if it does, it is just a minor annoyance, not a PITA.

Anyway you can 'ByRef' properties by doing ExtensionMethods.SetVisible(value => IsPanelVisible = value, true), which is a bit longer but works fine.

Reply

information Login or create an account to comment on this story