BESUG, Presentations and sessions »

[19 Oct 2009 | 0 Comments]

Last Thursday, I presented a BESUG session on RIA Services. 

Code & slides are online now, feel free to download them and have a look.  Most of RIA Services is covered, including but not limited to CRUD, Validation, extending generated code, Authentication and Authorization.  The Silverlight solution itself is built using a (pragmatic ;-)) MVVM approach.

Silverlight »

[7 Oct 2009 | 0 Comments]

Just now, I was surfing on the Infragistics site, having a look at their control suites.  I noticed their latest press release, concerning the development of a custom UI on Silverlight for MS Windows Embedded CE 6.0 R3

 

I was amazed.  Silverlight, on Windows Embedded CE?  That’s new. 

 

So I assumed this was just an announcement for something that would be released somewhere in the future.  Nevertheless, I decided to surf around some more, looking for more information, and sure enough I stumbled upon this page on the Microsoft site, which explicitly states Silverlight for Windows Embedded has been released, “enabling designers and developers to create exciting and visually compelling user interfaces for embedded devices”.  This update to Windows Embedded CE has been available since last week, and it can be downloaded here (update).

 

So, how come this wasn’t announced with lots of bells and whistles??  Beats me (well, maybe I just missed it ;-)), but nevertheless: way to go, Silverlight! ;-)  We can now design Silverlight applications for thin clients, set-top boxes, VoIP Phones, GPS devices, handheld terminals, …!

 

Update!  This is NOT the same Silverlight version you’d use for developing regular Silverlight applications, more information can be found here – yet it’s certainly a step in the right direction.

Silverlight, .NET, MVVM »

[6 Oct 2009 | 0 Comments]

When you’re working with the Model-View-ViewModel pattern in Silverlight, sooner or later you’ll run into the same problem most of us run into: what about animations?  Theoretically, if you want to follow the MVVM design pattern you’re using, your animation should be initiated from the ViewModel (no code behind on your View, remember?), but due the separation between your View and your ViewModel, the ViewModel shouldn’t know about a specific View.  It should exist indepently of it, so, for example, you can easily use the same ViewModel for multiple Views.

 

So, how do you solve this problem?  How do you get animations on your View while still respecting the MVVM pattern (more or less so, depending on your implementation)? 

 

Binary Bob has a very, very interesting post about this on his blog.  He talks about the problem, and then discusses several options on how to solve it, including sample code.  I especially like the StoryBoardManager-solution.  Make sure you check it out!

 

Silverlight »

[30 Sep 2009 | 1 Comments]

As I mentioned earlier, I submitted my Silverlight Drag Drop Manager to the Silverlight Control Builder contest.  I promised I’d let you know how it went, and… apparently, I won first prize! :-)

 

Should look nice on the codeplex page I suppose, and it’s always nice to get some appreciation.  So, thank you, Page Brooks and judges, I’m really, really happy with this! :)

Silverlight, WCF RIA Services »

[27 Sep 2009 | 0 Comments]

As some of you might know, the company I work for is hosting a BESUG session on Silverlight & RIA Services shortly (October 15th / click here to register!), for which I am the speaker.  At the moment, I’m composing a few of the slides and writing up some code, and I was wondering: if you had the possibility to ask a question about RIA Services, what would it be?

 

I’m not talking about the more general things (like “how do I get to my data”), those things will be addressed.  I’m looking for more specific questions, like “how do you work around having to rewrite code when you regenerate your DomainService?“, or “what are good strategies to achieve X or Y?” Hoping for some input on this, I decided to quickly blog this. ;-)

 

 

So, in short: what would YOU like to know about RIA Services?  Let me know (mail, twitter, or by replying to this post).  Tnx!

 

Silverlight, Drag and Drop Manager »

[16 Sep 2009 | 0 Comments]

Quick update: I’ve registered my Silverlight Drag and Drop Manager for the Silverlight Control Builder Contest, and it’s been accepted!  :-)  Check out all the entries here.

 

Entry deadline is September 19th, so I suppose I’ll know soon enough how it compares to the other entries.  I, for one, am quite curious about what the judges have to say about it – no matter where it ends in the contest, it’ll probably get me some tips and advice on what can be improved for future releases. 

 

Of course, I’ll keep you all updated!

Silverlight, Drag and Drop Manager »

[10 Sep 2009 | 0 Comments]

A new version of my open source project, the Silverlight Drag and Drop Manager, has just been released on CodePlex.

 

This is a major release, including various bugfixes, performance enhancements and loads of new features, including the ability to customize the return & switch-animations with easing & duration, the ability to customize the DropBorderBrush, a DropMode-property defining what should happen when you drop a DragSource, an AllowAnyDropTarget-property (so you don't have to manually add a list of valid DropTargets for each DragSource), a DragHandleMode-property, and many more.

 

Version 2.0 comes in 2 flavours: binaries for SL2 and binaries for SL3, including an updated sample application in the SL3 version.  If possible, I'd advise you to use SL3 (it allows for easing animations with the Drag and Drop manager), but if you've still got a project in SL2 that's been using a previous release of this software, you can safely upgrade.

 

For an all new example application, all the details, downloads, … one stop!

image

A full list of changes can be found on that CodePlex site, but for reference, here’s the list:

On DragSource:

  • Added property: AllDropTargetsValid:
    When this is set to true, all droptargets on the page will be valid for this dragsource.  The droptarget-list-property will effectively be ignored when this is set to true (default: false)
  • Added property: AutoFitGhost:
    Determines wether or not to auto-fit the ghost control.  It this is true, the ghost (if available) will be resized to match the content (default: false)
  • Added property: DragHandleMode:
    This property determines how you can drag your dragsource around: by using a draghandle (a bar on top of your dragsource), or without one, meaning you can drag by clicking anywhere in the dragsource
  • Added property: DropMode:
    Determines the behaviour when a dragsource is dropped, and the drop is valid: by default, the dragsource is dropped on the droptarget.  If you set DropMode to "ReturnDragSource", the dragsource is returned to where it originated from.  This mode can be useful if you just want to execute some code on dropping (dragsourcedropped event on droptarget is triggered and can be handled if you add a handler to it), but you do not want the dragsource to be removed from the originating collection.
  • Added property: ReturnAnimationDuration:
    Determines the length of the animation shown when returning a DragSource to its original position (default: 0.2)
  • Added property: ReturnAnimationEasingFunction:
    Determines the easing function of the animation shown when returning a DragSource to its original position (default: none, Silverlight 3 (or higher) required)
  • Added property: SwitchAnimationDuration:
    Determines the length of the animation shown when switching 2 DragSources (default: 0.2)
  • Added property: SwitchAnimationEasingFunction:
    Determines the easing function of the animation shown when switching 2 DragSources (default: none, Silverlight 3 (or higher) required)
  • Changed property: GhostVisibility:
    Changed ShowGhost (bool) to GhostVisibility (Visibility).  Determines wether or not the ghost control should be shown (default: Visible)

On DropTarget:

  • Added property: AllowPositionSave
    Determines wether or not the position of a droptarget should be saved.  Setting this option to true results in a significant increase in performance: in regular mode (when this property is false), droptarget positioning is calculated on the fly while dragging a dragsource.  When this is set to true, it's only calculated when the droptarget is loaded.  Do keep in mind that setting this to true will result in strange behaviour if the droptarget hasn't got a fixed position on screen (eg: when the droptarget itself can be moved around).   However, you can recalculate this position by hand by calling the "RecalculatePosition"-method on  the droptarget!  This option is advised when you have lots and lots of droptargets on one screen - in other cases, it shouldn't be necessary.
  • Added property: DropBorderBrush:
    The brush for the drop border
  • Added property: DropBorderCornerRadius:
    The cornerradius of the drop border
  • Added property: DropBorderThickness:
    The thickness of the drop border
  • Changed property: GhostVisibility:
    Changed ShowGhost (bool) to GhostVisibility (Visibility).  Determines wether or not the ghost control should be shown (default: Visible)

Bugfixes:

  • Extra checks to make sure all borders are removed when hovering is stopped - in some cases, the drop target would stay in "hovered"-mode even after the drag source had been dropped.
  • Sometimes, the animation used when switching 2 elements' position would let the elements go "underneath" other elements on the page.  This is now fixed, moving elements are always on top.
  • When clicking an element to start dragging, you'd sometimes loose the ability to drag.  This shouldn't happen anymore.
  • Various other small (performance) improvements and bugfixes.