locked
Command and CommandParameter is not enough RRS feed

  • Question

  • Hi

    i'm a wpf developer which switched to sliverlight some weeks ago and now i have the szenario to write best practice samples (already exist in wpf) for my coworks to make the switch to a silverlight very simple for them.

    Prism and MVVM is highly recommented + Siverlight 5 RC.

    Look and behold, i have big troubles to port the COMMAND sample (Sample => An login form with validation and login button).

    Requierments are:

     -1: define a command in code behind and bind it to the UI (easy) => solved

     -2: enabling the button only if username and psw are not empty (troubles)

     -3: supporting shortcuts (something like crtl + L => login) (troubles)

    I tried to solve all of them with the command like i did it in wpf, but in sliverlight is not possible to define a commandtarget, so that the canexecute get executed each time the focus changed and shortcuts are also not providet.

    My question is how would you try to solve this requierments, only with a custom command implemenation => quasi out of the box support for all 3 requierments (like wpf, like i try), or i'm on the wrong path and in sliverlight there is another way to go (Which one?)?

     

    Please help

     

    bernhard

     

     

     

     

     

    Thursday, October 27, 2011 7:28 AM

All replies