Shimmy Weitzhandler
Shimmy Weitzhandler

Reputation: 104741

Custom data-types?

I'd like to customize some data types in table designer.

Here is what came up in my mind:

Update, for TimeSpan, I've used TimeSpan.Ticks, but I'm looking for a better solution that will include custom display and validation.

Upvotes: 0

Views: 670

Answers (1)

Jake Berger
Jake Berger

Reputation: 5357

Visual Studio LightSwitch 2011 Extensibility Toolkit is the place to start.

Luminous LightSwitch Types already has a URL type, so you're halfway there.

For TimeSpan, you'll be creating a 1. LightSwitch Business Type. Use System.Int64 as underlying type to represent Ticks.

You'll want to read the example on creating a business type, which should be in the PDF "cookbook" or online.

Once you have the business type implemented, I'm 95% positive that you can designate a control which will be used to edit the value on the UI. There are plenty of FREE TimeSpan picker controls in WP7 and WPF. You can combine these solutions into a Silverlight version for LightSwitch usage.

WP7 TimeSpanPicker in depth
A TimeSpanPicker for Windows Phone 7
Time Picker (WPF)

p.s. Please, I ask but a simple thing, if/when you do find a solution to the TimeSpan; can you post the content online and provide a link in the comments below this answer. The community would be highly grateful. :)

Upvotes: 2

Related Questions