Flash vs Silverlight: Theming and Styling Flash vs Silverlight: Kit3D vs Papervision3D Example
Jan 07

This is a new request by Benoit. He said he doesn’t know how to detect double click in Silverlight. Well, the answer is simple, Silverlight doesn’t have any support for double clicking yet.

Is it funny? Anyway, there still a lot of methods and work around to simulate double click. Today, I will show you one.

Not only double clicking, Silverlight doesn’t have native support for mouse scroll as well. However, I think the problems will be solved in Silverlight 3. Let’s look forward!

Comparison

Flash implementation: 20 minutes

Silverlight implementation: 30 minutes (Implemented First)

Source codes

Flash

Silverlight

Shares and Enjoy~

Did you like this post?

Subscribe here:  

16 Responses to “Silverlight vs Flash: Double Click”

  1. kermit Says:

    verry verry well (y) :)

  2. Tek Says:

    Done and redone in less than a minute with Flash.

  3. admin Says:

    actually, there are some strange behavious when using detecting double click in Flash.

    If you add the polygons onto the Sprite other than to the stage, you will find that double click can’t be detected on top of the polygon.

  4. Colin Blair Says:

    The Silverlight code is not checking if the mouse moved between clicks. You can click in two different places and get the code to register a double click. Also, there is no need to have a timer running. Just store the time and position of the previous click and compare.

  5. admin Says:

    Colin,

    you are right, position can be checked as well.

    The timer can be skipped as well. I use it mainly for simplify the calculation.

  6. Eugen Says:

    Would be nice to have a sample as well for right-clicking and context menu :)

  7. Luke Says:

    Strange. When I use mouse everything works OK, but when I use a Wacom tablet, Flash does not recognize double clicks (double taps), Silverlight work OK with pen (stylus).

  8. ethings Says:

    Silverlight , flash, javafx, what good is it when most developers can’t design jack and have no imagination when it comes to GUI?

    Now Silverlight, nice try M$!

  9. dVyper Says:

    This is really poor - how can Silverlight have been released without support for double-click and mouse scrolling which are things needed in a GUI. I’m disappointed…

  10. Breno Says:

    Thank you for this post.

    It was realy usefull.

    []´s

  11. snort Says:

    ethings, the beauty of Silverlight is that it (normally) splits the design into a XAML file for designers and the code into a separate file for the developers. It’s not perfect, but its a significan improvement to Flash’s monolithic approach.

  12. Andy B Says:

    Nice to see debate here. Personally, I think the Silverlight event UI is half-baked. Would be nice to have OnDoubleClick and OnScroll events shipping with the standard implementation. Maybe a ClickCount property attached to the Click event object to detect multi-clicks instead?

    Furthermore, I feel that Silverlight NEEDS an i-Phone approach, where there are specific events for multiple UI activity like touching and gesturing - tap, double tap, swipe, squeeze, cirlce, etc. Which would give Silverlight a REAL edge over Flash.

    The one-click fits all approach of Silverlight is limiting, especially when trying to create mouse-less solutions (Silverlight for Mobile please note).

    Happy new year :-)

  13. Silverlight Cream for January 07, 2009 -- #478 Says:

    [...] Silverlight vs Flash: Double Click [...]

  14. Alexander Sorokin Says:

    Can you make it available under (new)BSD license? I’d like to use it in my project (http://code.google.com/p/cv-web-annotation-toolkit/), but it isn’t compatible with GPL.

    Thanks,
    Alex

  15. Double Click | Silverlike - A Free Microsoft Silverlight 3 Directory Says:

    [...] is no native support for double click in Silverlight 3. However, Terence Tsang created a sample to tackle this problem. When you double click on the application, a random [...]

  16. Trent Maimone Says:

    hi!, thanks for the info, this post was really useful ! avafx forex broker

Leave a Reply