APPENDIX D

image

Custom Screen Template View IDs

When you build a custom screen template (like I showed you in Chapter 20), you can call methods from the host-generator object to add content items to your screen. Once you add a content item, you can call the SetContentItemView method to change the control that binds to your content item. In effect, the SetContentItemView method provides the code equivalent of your using the drop-down box that appears next to a content item in the screen designer to select a different control type. Let’s say that you add a local screen property called screenPropertyContentItem and want to change the control type from an auto-complete box (the default control) to a rows layout. Here’s the code that you would use:

host.SetContentItemView(screenPropertyContentItem, "Microsoft.LightSwitch:RowsLayout");

"Microsoft.LightSwitch:RowsLayout" is the view ID that identifies the RowsLayout control type. When you build a custom screen template, it’s useful to know what view IDs to use; the table that follows summarizes these IDs.

Desktop Client View IDs

Control Type

View ID String

Data Grid

Microsoft.LightSwitch.RichClient:DataGrid

List

Microsoft.LightSwitch.RichClient:List

Command Controls

 

Button

Microsoft.LightSwitch.RichClient:Button

Link

Microsoft.LightSwitch.RichClient:Link

Details Controls

 

Summary

Microsoft.LightSwitch.RichClient:Summary

Modal Window Picker (Details)

Microsoft.LightSwitch.RichClient:ModalWindowPickerDetails

AutoCompleteBox (Details)

Microsoft.LightSwitch.RichClient:DetailsAutoCompleteBox

Value-Picker Controls (*)

 

Modal Window Picker (Value)

Microsoft.LightSwitch.RichClient:ModalWindowPickerValue

AutoCompleteBox (Value)

Microsoft.LightSwitch.RichClient:ValueAutoCompleteBox

Group Controls

 

Modal Window

Microsoft.LightSwitch.RichClient:ModalWindow

Rows Layout

Microsoft.LightSwitch.RichClient:RowsLayout

Columns Layout

Microsoft.LightSwitch.RichClient:ColumnsLayout

Table Layout

Microsoft.LightSwitch.RichClient:TableLayout

Table Column Layout

Microsoft.LightSwitch.RichClient:TableColumnLayout

Tabs Layout

Microsoft.LightSwitch.RichClient:TabsLayout

DataGridRow

Microsoft.LightSwitch.RichClient:DataGridRow

Picture And Text

Microsoft.LightSwitch.RichClient:PictureAndText

Text And Picture

Microsoft.LightSwitch.RichClient:TextAndPicture

GroupBox

Microsoft.LightSwitch.RichClient:GroupBox

Address Viewer SmartLayout

Microsoft.LightSwitch.Extensions:AddressViewerSmartLayout

Address Editor SmartLayout

Microsoft.LightSwitch.Extensions:AddressEditorSmartLayout

WebLink

Microsoft.LightSwitch.Extensions:WebLink

WebAddress Editor

Microsoft.LightSwitch.Extensions:WebAddressEditor

Value Controls

 

TextBox

Microsoft.LightSwitch.RichClient:TextBox

Label

Microsoft.LightSwitch.RichClient:Label

CheckBox

Microsoft.LightSwitch.RichClient:CheckBox

DateTime Picker

Microsoft.LightSwitch.RichClient:DateTimePicker

DateTime Viewer

Microsoft.LightSwitch.RichClient:DateTimeViewer

Date Picker

Microsoft.LightSwitch.RichClient:DatePicker

Date Viewer

Microsoft.LightSwitch.RichClient:DateViewer

Static Image

Microsoft.LightSwitch.RichClient:StaticImage

Static Label

Microsoft.LightSwitch.RichClient:StaticLabel

Email Address Viewer Control

Microsoft.LightSwitch.Extensions:EmailAddressViewerControl

Email Address Editor Control

Microsoft.LightSwitch.Extensions:EmailAddressEditorControl

Image Viewer Control

Microsoft.LightSwitch.Extensions:ImageViewerControl

Image Editor Control

Microsoft.LightSwitch.Extensions:ImageEditorControl

Money Viewer Control

Microsoft.LightSwitch.Extensions:MoneyViewerControl

Money Editor Control

Microsoft.LightSwitch.Extensions:MoneyEditorControl

Phone Number Viewer Control

Microsoft.LightSwitch.Extensions:PhoneNumberViewerControl

Phone Number Editor Control

Microsoft.LightSwitch.Extensions:PhoneNumberEditorControl

Percent Viewer Control

Microsoft.LightSwitch.Extensions:PercentViewerControl

Percent Editor Control

Microsoft.LightSwitch.Extensions:PercentEditorControl

HTML Client View IDs

Control Type

View ID String

Tile List

Microsoft.LightSwitch.MobileWeb:TileList

List

Microsoft.LightSwitch.MobileWeb:List

Table

Microsoft.LightSwitch.MobileWeb:Table

Details Controls

 

Summary

Microsoft.LightSwitch.MobileWeb:Summary

Details Picker

Microsoft.LightSwitch.MobileWeb:DetailsModalPicker

Value-Picker Controls (*)

 

Drop-Down

Microsoft.LightSwitch.MobileWeb:ValueDropdown

Group Controls

 

Rows Layout

Microsoft.LightSwitch.MobileWeb:RowsLayout

Columns Layout

Microsoft.LightSwitch.MobileWeb:ColumnsLayout

Value Controls

 

Text

Microsoft.LightSwitch.MobileWeb:Text

Text Area

Microsoft.LightSwitch.MobileWeb:TextArea

Text Box

Microsoft.LightSwitch.MobileWeb:TextBox

Paragraph

Microsoft.LightSwitch.MobileWeb:Paragraph

Flip Switch

Microsoft.LightSwitch.MobileWeb:FlipSwitch

Date Time Picker

Microsoft.LightSwitch.MobileWeb:DateTimePicker

Date Picker

Microsoft.LightSwitch.MobileWeb:DatePicker

Email Address Viewer

Microsoft.LightSwitch.MobileWeb:EmailAddressViewer

Email Address Editor

Microsoft.LightSwitch.MobileWeb:EmailAddressEditor

Image

Microsoft.LightSwitch.MobileWeb:Image

Money Viewer

Microsoft.LightSwitch.MobileWeb:MoneyViewer

Money Editor

Microsoft.LightSwitch.MobileWeb:MoneyEditor

Phone Number Viewer

Microsoft.LightSwitch.MobileWeb:PhoneNumberViewer

Phone Number Editor

Microsoft.LightSwitch.MobileWeb:PhoneNumberEditor

Percent Viewer

Microsoft.LightSwitch.MobileWeb:PercentViewer

Percent Editor

Microsoft.LightSwitch.MobileWeb:PercentEditor

* LightSwitch uses value picker controls to display the choice list items that you define through the table property editor.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset