locked
Extensions and Custom controls RRS feed

  • Question

  • I'm using Lightswitch in VS2012 with the HTML client.

    Can extensions and custom controls be created that are not dependent on Silverlight?

    If so, how can I find out how to create them. I haven't been able to locate much information on this.

    I don't expect a full explaination from this forum, but some links to tutorials or such would be appeciated.

    Friday, November 1, 2013 5:12 PM

Answers

  • For custom HTML controls before VS2013 you needed to implement them in the HTML content and scripts, you could not have them show up in the LS designer. You can look at the in-built msls script for implementation of basic controls such as textbox, textarea, datetime etc. and replicate.

    For VS2013 it is possible to decorate controls and screen templates to show up in design-time. There is a screen template sample that gets you started for both HTML and Silverlight. I have not yet had time to backtrack and retry in VS2012.

    You can always keep you controls as separate JQuery (&mobile) and there are many available via nuget. I am sure best advice on the exact way to proceed will vary.

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    • Marked as answer by Angie Xu Monday, November 18, 2013 12:14 PM
    Tuesday, November 5, 2013 10:03 AM
  • You would be much better using VS2013 for HTML clients, we were inclined not to deploy any production VS2012 HTML client apps.

    With VS2013 you can enable custom HTML controls to appear in the IDE. I understand that this is not encouraged but we are happy to use this in simple loosely-coupled scenarios.

    JQuery Mobile widgets and a little JavaScript works reasonably well, supplemented by screen templates for more common complex patterns.

    Dave 


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    • Marked as answer by db_csg Thursday, December 26, 2013 10:16 PM
    Friday, December 20, 2013 6:06 PM

All replies

  • Hi db_csg

    Please take a look at this series of tutorials about custom controls in LightSwitch,

    How to: Create a LightSwitch Control

    Creating A LightSwitch Custom Silverlight Control 

    How to: Add a Custom Control to a Silverlight Screen

    hope it helps,

    Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 5, 2013 2:43 AM
  • For custom HTML controls before VS2013 you needed to implement them in the HTML content and scripts, you could not have them show up in the LS designer. You can look at the in-built msls script for implementation of basic controls such as textbox, textarea, datetime etc. and replicate.

    For VS2013 it is possible to decorate controls and screen templates to show up in design-time. There is a screen template sample that gets you started for both HTML and Silverlight. I have not yet had time to backtrack and retry in VS2012.

    You can always keep you controls as separate JQuery (&mobile) and there are many available via nuget. I am sure best advice on the exact way to proceed will vary.

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    • Marked as answer by Angie Xu Monday, November 18, 2013 12:14 PM
    Tuesday, November 5, 2013 10:03 AM
  • Thanks for responding, however these links are all based on silverlight, which I cannot use. I wanted to see if equivalent functionality existed for the HTML client and it appears as though it is not as easy to implement the same functionality with that client in VS2012.


    db_csg

    Friday, December 20, 2013 5:18 PM
  • Thanks for your response, Dave. That's kind of what I assumed, but just wanted some verification.


    db_csg

    Friday, December 20, 2013 5:19 PM
  • You would be much better using VS2013 for HTML clients, we were inclined not to deploy any production VS2012 HTML client apps.

    With VS2013 you can enable custom HTML controls to appear in the IDE. I understand that this is not encouraged but we are happy to use this in simple loosely-coupled scenarios.

    JQuery Mobile widgets and a little JavaScript works reasonably well, supplemented by screen templates for more common complex patterns.

    Dave 


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    • Marked as answer by db_csg Thursday, December 26, 2013 10:16 PM
    Friday, December 20, 2013 6:06 PM
  • Thanks for the tip. I'll keep that in mind.

    db_csg

    Friday, December 20, 2013 6:11 PM
  • I'm using Lightswitch in VS2012 with the HTML client.

    Can extensions and custom controls be created that are not dependent on Silverlight?

    If so, how can I find out how to create them.


    Creating Advanced LightSwitch HTML Screen Templates

    Unleash the Power - Get the LightSwitch HTML Client book

    http://LightSwitchHelpWebsite.com

    Saturday, December 21, 2013 7:41 AM