Custom controls in VS LS 2013/15

Category: visual studio lsextensibility

Question

reigh7 on Thu, 26 Mar 2015 19:05:41


I am looking into building custom controls to add color to existing controls conditionally.
Here are the blogs and forums I have looked at LS Team Blog,Forum 2011,Forum 2012

First yes/no question these instructions are for LS and VS 2011 and 2012 is there an updated forum or blog on using VS and Blend in 2013 and VS 2015 when it comes out?

If there is a forum can you link me to it. PS I cannot afford d Component One extentions for instance but do have blend.

Lastly can I use existing LS controls and modify them in blend for instance a choice list or autocomplete box that changes back ground color based on the selection made or a range of selections of time. Ideally there would also be a way to define the ranges of time by properties in other tables but I can work this control with or without this option.

Replies

Yanjin Xu - MSFT on Mon, 30 Mar 2015 08:01:20


I am looking into building custom controls to add color to existing controls conditionally.

Hi reigh,

We can extend the functionality of LightSwitch by creating extensions using Visual Studio 2013 Professional, the Visual Studio 2013 SDK, and the LightSwitch Extensibility Toolkit for Visual Studio 2013.

If you want to change the background color of a control in a LightSwitch, Jan's blog is available for you.

check out "Change the background color of a control in a LightSwitch desktop app" for further information.

Best regards,

Angie

reigh7 on Tue, 31 Mar 2015 20:00:38


Sounds good I will give this a try soon. I will need to see what parts of the controls I can edit. In my scenario there is a grid that shows a row for each new entry. I want to change the background of the autocomplete box in one column to one color and another column another color. IE each property in the column will change to the color for that property when filled. If I can't change them this way at the least I want to be able to change each column to different colors to match the color of a different part of the screen showing simple autocomplete boxes to enforce their relationship visually,

I still have to upgrade to VS 2013 community which I read is the same as VS pro but only available for certain users. I also have all of the prerequisites for VS pro 2012. I am just about to upgrade if I can figure this out. I was still unclear on how to upgrade from 2012 without loosing access to certain Microsoft extensions for VS. In the past I know all extensions had to be removed from the project and reinstalled after the upgrade but I read in one place that Microsoft native extensions should remain in the project. That makes sense because I could not find some of them even the ones like Cosmopolitan which seems simple to port over to 2013.

reigh7 on Wed, 01 Apr 2015 17:27:46


I am very new to extensibility. I read Jan's blog and was unsure were to put that code which will help me with the task of finding the controls etc.

Am I suppose to build a new project some sort of extension project? I have that project type available for VS LightSwitch. Then use that extension by adding that extension to those available to the project I want to modify?

-OR-

Am I suppose to create a new project of some kind and add these code classes to an existing project I want to modify?

I need to know how to get started since it is not explicitly stated in Jan's blog.