Page view counter
Silverlight 2.0 missing features
Last post 06-12-2008 9:51 AM by bropa09. 108 replies.
Sort Posts:
03-07-2008 2:44 PM
Silverlight 2.0 missing features

Hello,

   I am trying to create a silverlight 2.0 application and I'm noticing a few missing features compared to WPF. I'm using Blend 2.5 preview also so I'm not sure if I'm encountering real problems or blend bugs. I seem to get different error messages for different things depending on if I'm in blend or VS so I'm not sure what is correct.

 
1.) Styles

   In blend if I have the code <Style x:Key="s1" TargetType="{x:Type Rectangle}">...</Style> I get an error because it doesn't like {x:Type ...}. If I remove the target type then I end up with errors on the PropertyName attributes in the Setter tags. What is going on?

2.) Templates

   Where the heck are the Template properties? Was this left out or is this a Blend bug? I'm having a hard time coming to terms with the idea that you cannot templatize anything... this is a major downside to silverlight if it's true. Will I really need to create a control that inherits from ButtonBase to get a templatized button? UGH.

3.) MergedDictionaries

   I was hoping to have a shared resource dictionary file between a WPF application and a silverlight application but it seems that I cannot link to a resource dictionary file in silverlight because there is no MergedDictionary property. How is themeing supposed to happen if I cannot do this?

4.) RoutedEvent

  I had created a control but the RoutedEvent class is nowhere to be found... There are RoutedEventArgs and RoutedEventHandler objects but no way to declare a routed event... what am I supposed to do about this?

5.) FrameworkPropertyMetadata

  I have created some DependencyProperties that (in WPF) required the declaration of property metadata to specify a handler and to declare that it affects rendering. In silverlight you just pass in a handler but cannot specify AffectsRender, is this ok? Can I expect the same behavior?

6.) Linked Files

  There seems to be a bug with linked user controls. I can see in the code generated files for silverlight that it's trying to load the xaml files but since they are linked files the paths are completely wrong and it blows up.

7.) Margin Resources

  If I convert a margin property to a local resource everything works fine in blend but visual studio has a parsing error on the xaml blend produced. Something like <Thickness x:Key="t1">2,2,2,2</Thickness>, visual studio does not like this.
 

 What is going on ?!?!

---
http://www.justnbusiness.com/
~justin chase

justncase80

Loading...
Joined on 11-22-2005
MN, USA
Posts 141
03-08-2008 5:00 AM
Re: Silverlight 2.0 missing features

Another feature request : capability to generate image using kind of putpixel methods.

deltakosh

Loading...
Joined on 03-06-2008
Posts 6
03-08-2008 5:47 AM
Re: Silverlight 2.0 missing features

Hi,

I'm playing with Silverlight since yesterday, trying to "port" some WPF application into Silverlight. And the main issues I encountered were about Styliing and Templating.

About Styles, I had the same issues, until I saw that TargetType synthax was different from the WPF one : You should directly write  : <Style x:Key="s1" TargetType="Rectangle">...</Style>

About templates, I had problems until I extract my templates to put them directly within the resources of the XAML files  using targeted items. Another point : It seems that Silverlight Template don't support Triggers and Resources ( ControlTemplate.Triggers and ControlTemplate.Resource ). It's quite annoying, for it is part of the power of XAML. But I saw samples using ControlTemplate.Triggers .. So, did I do something Wrong ?

 Another issue : It seems that Xaml files don't support anymore the "DynamicResource" directive. Eg, when entering "<MyControl Template="{DynamicResource MyResource}>" , Blend 2.5 beta and Visual Studio 2008's editor both send my an error about "DynamicResource". Is it normal ?

Roland Tomczak

Loading...
Joined on 03-08-2008
Toulouse, France
Posts 2
03-08-2008 1:31 PM
Re: Silverlight 2.0 missing features

Thanks for that TargetType tip! I've noticed the same things with the DynamicResource but I haven't tried the triggers yet. I bet you these things will be there for the final version of Silverilght. It's hard to believe that they'll leave it out, it's so essential. It would be nice to hear from someone at Microsoft that there are plans to, at least, make it more similar to WPF. Obviously they won't be able to tell us right now exactly what it will look like but it would be nice to have confirmation that at least some things will be better.

Thanks.

---
http://www.justnbusiness.com/
~justin chase

justncase80

Loading...
Joined on 11-22-2005
MN, USA
Posts 141
03-08-2008 2:53 PM
Re: Silverlight 2.0 missing features

Another feature desperately needed is the x:Static data binding extension, to be able to do something like this:

 Text="{Binding UserName,Source={x:Static a:IdentityManager.Current},Mode=OneWay}"

 Where IdentityManager is a singleton referenced by Current, and the property is UserName.

 

 

m.wawrusch

Loading...
Joined on 12-15-2007
Posts 13
03-08-2008 8:31 PM
Re: Silverlight 2.0 missing features

Silverlight 2 is meant to be a lean, mean and cross-platform subset of WPF. Some features are not there now, but will be eventually; other features might not ever make it into Silverlight. One of the things that we'll be relying on for deciding where to invest is feedback from the community. So please, let us know where it hurts--we're listening.

This might be a fun exercise: If you had 100 Arbitrary Monetary Units to spend on Silverlight features, what would you spend it on? For example, you might decide that you really need merged ResourceDictionaries, so you'd spend 50 AMU on that, but maybe Margin Resources are only worth 5 AMU to you, etc.

What am I bid? :)

Answers to original post:

1) Omit the x:Type, as has already been noted.

2) Templated controls are in SL2B1.

3-5) Not available.

6) What is a linked file?

7) Yeah, that doesn't work. You can set the Margin in a Style.

Dave Relyea [MSFT]
http://blogs.msdn.com/devdave

Dave Relyea

Loading...
Joined on 05-09-2007
Posts 245
03-21-2008 6:54 PM
Re: Silverlight 2.0 missing features

Hi Dave,

I don’t know how I missed this but I have been trying to get attention of anyone from MSFT at wrong places.

Well my requirements are very simple actually, and very straight and similar to WPF.

5 AMU Brushes (Visual Brush, Drawing Brush etc.)

I don’t know how realistic this is but Visual Brush would be a great thing to have in Silverlight.

5 AMU Sockets

Really need improvements here.

 10 AMU RoutedEvents

I have been struggling to figure out how Silverlight is handling RoutedEvents, it really baffles me how Silverlight handles routed events, can you please simplify this? Also creating custom RoutedEvents is very handy at times, so please EventManager.

20 AMU Dynamic Binding

I don’t know about this or your plans for including Dynamic Binding in Silverlight, but given the fact that you have included DataGrid in Silverlight gives me a suspicion that you don’t have intention of including Dynamic Binding in Silverlight in near future. But please this is very important to us.

20 AMU Styles / Resource Dictionaries

No offence but Styles in Silverlight is a joke, what is the point of having style if you can’t add them to one place; we still have to make copies of Styles if we have to define them again and again.

20 AMU Control Templates

Yes, there are control templates in Silverlight but compared to WPF they are absolutely nothing, I just love them for what they are, I think fixing Styles would really help getting better Control Templates.

20 AMU Triggers

I am just surprised why Triggers are not supported in Silverlight; this really saves lots of time in writing simple events.

I don’t know how realistic these are, and how much they are going to affect Plug-in size but please these are the issues that really bothers me, there are many features that we might expect but I don’t see a point in adding new points when we have these issues.

Regards

--
Imran Shaik
If this answers your question please select "Mark as Answered"
Old Blog | Silverlight 2.0 Quintessential Rambling |My Feed

Cass

Loading...
Joined on 09-15-2007
London, UK
Posts 654
03-21-2008 7:11 PM
Re: Silverlight 2.0 missing features

Thanks. I'll pass this along to the product managers. What more specifically do you need with sockets?

AFAIK you can put styles in the application resources.

Templates are pretty much the same except for the limitations imposed by styling, and the lack of triggers. Just out of curiousity, how do you do your templates, or how would you do them if everything was available? Blend? VS? Notepad?

 

Dave Relyea [MSFT]
http://blogs.msdn.com/devdave

Dave Relyea

Loading...
Joined on 05-09-2007
Posts 245
03-21-2008 7:29 PM
Re: Silverlight 2.0 missing features

I would definitely like to reiterate ResourceDictionaries and DynamicBinding and everything related to being able to theme (style / template) your application in a seperate xaml file.

---
http://www.justnbusiness.com/
~justin chase

justncase80

Loading...
Joined on 11-22-2005
MN, USA
Posts 141
03-21-2008 8:27 PM
Re: Silverlight 2.0 missing features

Dave Relyea:

Thanks. I'll pass this along to the product managers. What more specifically do you need with sockets?

AFAIK you can put styles in the application resources.

Templates are pretty much the same except for the limitations imposed by styling, and the lack of triggers. Just out of curiousity, how do you do your templates, or how would you do them if everything was available? Blend? VS? Notepad?

 

With Sockets, the most important issue is cross domain issues and ports, with these in place its actually not possible to get the most out of Sockets, as I see the possibilities of Sockets can really be achieved only if cross domain calls are supported.

Well I could go on and on with feature requests, but those I mentioned in my previous post are the most important as far as I am concerned they are already in place and they needs to be seriously fixed, and I understand that if you fix styles you fix all other issues like Control Templates, and I adore the control templates that are available in WPF, and I use my templates in Blend, it makes templating very easy.

 I don’t think trying to include new features will make Silverlight any better platform than actually fixing it.

Having said that, there are also issues I would love to see fixed in Beta 2, like

·         Keyboard entry on Full Screen Mode

·         Sync support for communication

Because of the nature of my work and my projects (I deal mostly with Videos), I am a little disappointed with MediaElement.  Don’t take me wrong but I love the new capabilities of MediaElement in Silverlight 2 and I can actually see the difference in buffering compared to Silverlight 1/1.1, but playing a media in MediaElement at a different slower/higher rate similar to WPF would be very nice.  But there are also issues with playing asx (Media Playlists) over http, in Silverlight 2 Beta 1 asx is only supported over mms and not http. There are also issues over reading markers on wmv, if reading through a playlist asx.

At a different level I would like to know what Silverlight team think about supporting wsx and Server-Side Playlists (SSPL)/Wallclock in Silverlight, I am currently working on a project where this is really essential and I don’t understand the reason it is not supported after all its just a playlist of wmv files, can we see this in near future perhaps in Beta 2?

--
Imran Shaik
If this answers your question please select "Mark as Answered"
Old Blog | Silverlight 2.0 Quintessential Rambling |My Feed

Cass

Loading...
Joined on 09-15-2007
London, UK
Posts 654
03-21-2008 8:54 PM
Re: Silverlight 2.0 missing features

 

This might be a fun exercise: If you had 100 Arbitrary Monetary Units to spend on Silverlight features, what would you spend it on?

Hi Dave;

Thanks for giving some attention to this post. I'm going to switch to a different direction and spend my AMU there.

For the past year that I've been waiting for SL 2 to be available, I have been anticipating to start developing Business database driven application. I had made a conscious decision to use SL instead of ASP.Net to offer clients a more modern and state of the art business application that can be used via web and bowser. To me, as business application developer, database capabilities are considered as the core of this framework. And trust me, for the past 2 and half weeks I have discussions with many other colleagues who want to use SL for the same purpose and feel database features are very important.

So, I'd put my 100 AMU on features that are similar  (at least) to what ASP.Net offers out of the box. Secondly, more than betting money on it, could you please give us some info about what the plans are to get data to-and-from SL as easy and straight forward as possible?

I look forward getting some constructive answers here!

Thank you Sir!
 

____________________________________________________________________________________________________
Best Regards;
..Ben

Please visit www.MicroIntelligence.Com for our services!

BenHayat

Loading...
Joined on 01-14-2004
Estero, Fl USA
Posts 404
03-21-2008 9:13 PM
Re: Silverlight 2.0 missing features

I'm building an online "drawing" program (actually a free form photo album).  I have written it in WPF and the only thing missing there in full trust mode is more image manipulation (e.g. contrast, brightness, sepia etc...). In partial trust XBAP what is missing is the ability to send an application generated image (from visualbrush) to the server, fileSave and XamlWriter.Save (even to a string).

For Silverlight what I need is:

1. Visualbrush

2. Viewbox attribute of imagebrush (for cropping arbitrary sections)

3. Menus including ContextMenu

4. XamlWriter.Save at least to a string

5. Ability to send application generated image to server.

6. LayoutTransform

7. Viewbox to automatically resize objects

8. WrapPanel

9. Adorners, but I can work around that

10. In general, more controls and capabilities to make it closer to WPF.

 

Tom

TomGiam

Loading...
Joined on 03-06-2008
Posts 32
03-21-2008 9:15 PM
Re: Silverlight 2.0 missing features

I think MS should really really carefully evaluate some of the styling, templating, and binding support in SL2 as their claim to have SL as a direct subset rings hallow without some of the fundemental features like those mentioned here! For example, there is a huge difference between using triggers and the parts model being pushed for SL2.. This obviously creates two code sets as far as I am concerned, and any future development of both SL and WPF would have to diverge on this key design strategy - also, this is not something MS can easily add later without having to change the design tactics en-mass! Overall, I would appreciate 100% design parity with WPF whilst giving up some feature sets in the short term! Oh, I would definately pay equal importance on performance too, xaml happy code makes for a loaded visual tree! Is someone working to get the lag out of scrolling, anyone??

ork

Loading...
Joined on 03-12-2008
Posts 20
03-21-2008 9:35 PM
Re: Silverlight 2.0 missing features

I think I must add the lack of ISerializable is disheartning and so is the lack of the whole dataset model. I think MS should try harder to rank up the compatibility with the bigger .NET framework - particularly in the area of data consuption as that is the essence of SL (ie. Data Consumption for Presentation). Yes, web services, wcf and rest type models are all avaliable for use, but the old rank and file methodoliges should also be there - for example, I think the distinct lack of dataset hurts when you want to consume or use non-typed but structured data, in this case LINQ inspired anyomous types don't quite cut it.

ork

Loading...
Joined on 03-12-2008
Posts 20
03-22-2008 4:25 AM
Re: Silverlight 2.0 missing features

I don't think that ISerializable or DataSets are really that valuable frankly. Because of the nature of silverlight you will never be able to directly access data from a database which really defeats the whole purpose of the dataset. You make a service reference and it generates for you your proxy classes which are (frankly) better than datasets. This is good enough.

---
http://www.justnbusiness.com/
~justin chase

justncase80

Loading...
Joined on 11-22-2005
MN, USA
Posts 141
03-22-2008 9:21 AM
Re: Re: Silverlight 2.0 missing features

For me, the most important thing is that the graphical subset defined by Silverlight becomes compatible with the most important features of WPF. Aka, 40 AM on Styles and Templates Triggers ( really good for designers, too ), and 30 AM for resource dictionnaries. I offer you the 30 remaining AM, just to motivate you to continue this way :D.

 I've port one of our biggest WPF application in Silverlight, as a proof of concept. And I was delighted to see that there were finally not so much differences, apart from triggers.

Roland Tomczak

Loading...
Joined on 03-08-2008
Toulouse, France
Posts 2
03-22-2008 9:31 AM
Re: Silverlight 2.0 missing features

I am really surprised to see that most of us are unhappy about the Style/Templates/Triggers features (No offence Ben Smile). But I am also surprised that no one is really bragging about new features like Printing (XPS)/New Controls.

Yeah, there is no Wrap Panel/Dock Panel but I think that goes unsaid I reckon.

 

--
Imran Shaik
If this answers your question please select "Mark as Answered"
Old Blog | Silverlight 2.0 Quintessential Rambling |My Feed

Cass

Loading...
Joined on 09-15-2007
London, UK
Posts 654
03-22-2008 10:21 AM
Re: Silverlight 2.0 missing features

Cass:

I am really surprised to see that most of us are unhappy about the Style/Templates/Triggers features (No offence Ben Smile).

 

Ok, Ok! I'll remember this... trying to lobby against my feature list? Wait till I see you in London next time. Big Smile 

____________________________________________________________________________________________________
Best Regards;
..Ben

Please visit www.MicroIntelligence.Com for our services!

BenHayat

Loading...
Joined on 01-14-2004
Estero, Fl USA
Posts 404
03-22-2008 12:14 PM
Re: Silverlight 2.0 missing features

BenHayat:
Ok, Ok! I'll remember this... trying to lobby against my feature list? Wait till I see you in London next time. Big Smile 

Err... Any chance you going to forget about it by then?  

--
Imran Shaik
If this answers your question please select "Mark as Answered"
Old Blog | Silverlight 2.0 Quintessential Rambling |My Feed

Cass

Loading...
Joined on 09-15-2007
London, UK
Posts 654
03-22-2008 12:24 PM
Re: Silverlight 2.0 missing features

Cass:
Err... Any chance you going to forget about it by then?  
 

No chance! Remember, my middle name is "Elephant"! Wink

____________________________________________________________________________________________________
Best Regards;
..Ben

Please visit www.MicroIntelligence.Com for our services!

BenHayat

Loading...
Joined on 01-14-2004
Estero, Fl USA
Posts 404
03-24-2008 7:57 AM
Re: Silverlight 2.0 missing features

Another missing feautre: It would be a good idea to have the ability of exporting the content of a canvas to a jpg/png file.

A lot of people will use Silverlight to create "diagramming" applications, one of the common features is to export the diagram to several format (one of them... a pic to hang it on the wall ;-)).

 Thanks

  Braulio

// ---------------------------------
    Braulio Diez

    http://www.tipsdotnet.com
// ---------------------------------

Brauliod

Loading...
Joined on 06-04-2007
Malaga (Spain)
Posts 230
03-24-2008 8:44 AM
Re: Re: Silverlight 2.0 missing features

Brauliod, I second this. I just spent 2 days writing a server side workaround (ever run WPF in a WindowsService, this ain't no fun..) to get image export working.

Another feature I would love to see is ClipToBounds. Although this can be emulated using Clip it is so much more convenienent and probably one of the things everybody uses in WPF applications.

TextTrimming seems to be missing too.

And while you are at it please release the source code for the TextBox control too. I and probably lot's of others need some kind of RichTextEditor and worst case scenario is to write one based on the TextBox (If anyone is working on that and needs beta testing let me know, I have done so before for a component vendor and have an urgent need for this control).

 

 

m.wawrusch

Loading...
Joined on 12-15-2007
Posts 13
03-25-2008 12:50 PM
Re: Silverlight 2.0 missing features

-- This might be a fun exercise: If you had 100 Arbitrary Monetary Units to spend on Silverlight features, what would you spend it on? 

20 AMU: Style/Triggers/Templates as in WPF

80 AMU: Synchronous HTTP server calls (also in background threads). Really critical for large C/S projects.

 

 

ot42

Loading...
Joined on 05-03-2007
Posts 21
03-25-2008 2:34 PM
Re: Silverlight 2.0 missing features

I disagree with the Synchronous request. It's not actually necessary for any situation, you just have to think about the problem a little differently is all. I don't mind at all that your proxy objects are generating async only calls.

Synchronous web service calls result in slow blocking operations that degrade user experience. For large projects you will eventually HAVE to go async and try converting a large project half-way through when you realize you need to do everything async... what a nightmare. It's better to just start out thinking asynchronously.

---
http://www.justnbusiness.com/
~justin chase

justncase80

Loading...
Joined on 11-22-2005
MN, USA
Posts 141
03-25-2008 2:45 PM
Re: Silverlight 2.0 missing features

..and try converting a large project half-way through when you realize you need to do everything async... what a nightmare.

Exactly! We already have a very large AJAX application that we would like to port (not rewrite) to Silverlight. To do that with async will be a nightmare.

If we had to rewrite the app from scratch, we could probably do it using async (or at least large parts of it). But this illustrates very well why we should have the choice.

ot42

Loading...
Joined on 05-03-2007
Posts 21
03-25-2008 2:51 PM
Re: Silverlight 2.0 missing features

That's a good point... however not redoing it will be a nightmare for the user Stick out tongue 

---
http://www.justnbusiness.com/
~justin chase

justncase80

Loading...
Joined on 11-22-2005
MN, USA
Posts 141
03-25-2008 3:02 PM
Re: Silverlight 2.0 missing features

Smile

Actually, this is a C/S app that always run on a local network with good response times. Currently, it runs just fine in a browser and a SL version should perform no worse.

After porting we would start optimizing the user experience, but we simply do not have the resources to re-architect the whole thing.

ot42

Loading...
Joined on 05-03-2007
Posts 21
03-25-2008 6:04 PM
Re: Silverlight 2.0 missing features

 

This might be a fun exercise: If you had 100 Arbitrary Monetary Units to spend on Silverlight features, what would you spend it on?

Hi Dave;

Thanks for giving some attention to this post. I'm going to switch to a different direction and spend my AMU there.

For the past year that I've been waiting for SL 2 to be available, I have been anticipating to start developing Business database driven application. I had made a conscious decision to use SL instead of ASP.Net to offer clients a more modern and state of the art business application that can be used via web and bowser. To me, as business application developer, database capabilities are considered as the core of this framework. And trust me, for the past 2 and half weeks I have discussions with many other colleagues who want to use SL for the same purpose and feel database features are very important.

So, I'd put my 100 AMU on features that are similar  (at least) to what ASP.Net offers out of the box. Secondly, more than betting money on it, could you please give us some info about what the plans are to get data to-and-from SL as easy and straight forward as possible?

I look forward getting some constructive answers here!

Thank you Sir!
 

BenHayat:

Hi Dave and others as well, 

Oh God, I bid my 100 AMU on it too.  I mean, yeah its nice it works to handle data but what a heck of a job to make it work.  That would be so cool just by using the traditional way of using Web services with direct use of DataSet and custom object we did since a few years.

Imagine I did make a Wrapper around the DataSet so it is so easy to handle data that its like playing lego.  Now its unusable with SL  Ah well, I'm not here to complain,  I'm just full of hope :)

Keep the good work tho.  I will support SL as long as I can see with my own eyes.  Since Monitors are killing them :)  Ahhhhhh ages.

GearWorld

Loading...
Joined on 09-13-2007
Posts 574
03-25-2008 10:37 PM
Re: Silverlight 2.0 missing features

Silverlight has a quite robust system of data access right now... WCF web service references. One thing you have to keep in mind is that silverlight is NOT a web technology, it actually runs on the client machine and is merely distributed via the web. With that in mind you must realize silverlight applications will never have the ability to make direct connections to a database. Instead you make a webservice, or WCF service then make a reference from your silverlight application.

All of your server side code is exactly the same as it has always been you just access your proxy objects somewhat differently in your silverlight code behind (primarily because you can only make async calls to your service).

---
http://www.justnbusiness.com/
~justin chase

justncase80

Loading...
Joined on 11-22-2005
MN, USA
Posts 141
03-26-2008 4:49 PM
Re: Silverlight 2.0 missing features
I think it is plain wrong to say that SL will never access a db directly and therefore there is no need to support any db related technology.. I suppose you have heard of google gears, thought let me introduce to you VistaDb (http://www.vistadb.net).. it is a fully SLQ Server 2005 complaint db which is 100% managed code based (with no unsafe or unmanaged code) written entirely in c# and a footprint of 1MB. And last year they mentioned on their blog that someone in SL team managed to get their db running in SL on an internal build.. and on their part, they are pursuing getting the db working within SL's .net on the client side..