0

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

Here is what came up in my mind:

  • TimeSpan
  • Url - also this type should be a valid URL and display as link

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

Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632

1 Answers1

2

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. :)

Jake Berger
  • 5,237
  • 1
  • 28
  • 22
  • Thanks for linking to my Luminous Types! I'm going to have a look at how difficult it'd be to add a Timespan type to the existing types. I'll post here if I do manage to add one. – Yann Duran Apr 26 '12 at 02:34