APPENDIX D

image

Custom Screen Template View IDs

When you’re writing a custom screen template (as discussed in Chapter 13), you can call the host generator methods to add content items onto your screen. Once you’ve done this, you can call the SetContentItemView method to change the control that renders your data item. In effect, the SetContentItemView method provides the code equivalent of you using the drop-down box that appears next to a data item in the screen designer to select a different control type. Let’s say that you’ve added a local screen property called screenPropertyContentItem and want to change the control type from an autocomplete 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 ViewID that identifies the RowsLayout control type. When you’re writing a custom screen template, you’ll need to know what ViewIDs to use, and this is summarized in the following table. The ViewIDs that you need to use will vary depending on whether the user has upgraded  their project to use the HTML client, and this is shown in the following table.    

Control Type ViewID String (Project that hasn’t been upgraded with the HTML client) ViewID String (Project that has been upgraded with the HTML client)
Collection Controls
DataGrid Microsoft.LightSwitch:DataGrid Microsoft.LightSwitch.RichClient:DataGrid
DataGrid Microsoft.LightSwitch:DataGrid Microsoft.LightSwitch.RichClient:DataGrid
Command Controls
Button Microsoft.LightSwitch:Button Microsoft.LightSwitch.RichClient:Button
Link Microsoft.LightSwitch:Link Microsoft.LightSwitch.RichClient:Link
ShellButton Microsoft.LightSwitch:ShellButton Microsoft.LightSwitch.RichClient:ShellButton
CollectionButton Microsoft.LightSwitch:CollectionButton Microsoft.LightSwitch.RichClient:CollectionButton
Details Controls
Summary Microsoft.LightSwitch:Summary Microsoft.LightSwitch.RichClient:Summary
Control Type ViewID String (Project that hasn’t been upgraded with the HTML client) ViewID String (Project that has been upgraded with the HTML client)
Details Picker Controls
ModalWindowPickerDetails Microsoft.LightSwitch:ModalWindowPickerDetails Microsoft.LightSwitch.RichClient:ModalWindowPickerDetails
DetailsAutoCompleteBox Microsoft.LightSwitch:DetailsAutoCompleteBox Microsoft.LightSwitch.RichClient:DetailsAutoCompleteBox
Value Picker Controls
ModalWindowPickerValue Microsoft.LightSwitch:ModalWindowPickerValue Microsoft.LightSwitch.RichClient:ModalWindowPickerValue
ValueAutoCompleteBox Microsoft.LightSwitch:ValueAutoCompleteBox Microsoft.LightSwitch.RichClient:ValueAutoCompleteBox
Group Controls
ModalWindow Microsoft.LightSwitch:ModalWindow Microsoft.LightSwitch.RichClient:ModalWindow
RowsLayout Microsoft.LightSwitch:RowsLayout Microsoft.LightSwitch.RichClient:RowsLayout
ColumnsLayout Microsoft.LightSwitch:ColumnsLayout Microsoft.LightSwitch.RichClient:ColumnsLayout
TableLayout Microsoft.LightSwitch:TableLayout Microsoft.LightSwitch.RichClient:TableLayout
TableColumnLayout Microsoft.LightSwitch:TableColumnLayout Microsoft.LightSwitch.RichClient:TableColumnLayout
TabsLayout Microsoft.LightSwitch:TabsLayout Microsoft.LightSwitch.RichClient:TabsLayout
DataGridRow Microsoft.LightSwitch:DataGridRow Microsoft.LightSwitch.RichClient:DataGridRow
PictureAndText Microsoft.LightSwitch:PictureAndText Microsoft.LightSwitch.RichClient:PictureAndText
TextAndPicture Microsoft.LightSwitch:TextAndPicture Microsoft.LightSwitch.RichClient:TextAndPicture
GroupBox Microsoft.LightSwitch:GroupBox Microsoft.LightSwitch.RichClient:GroupBox
AddressViewerSmartLayout Microsoft.LightSwitch.Extensions:AddressViewerSmartLayout Microsoft.LightSwitch.Extensions:AddressViewerSmartLayout
AddressEditorSmartLayout Microsoft.LightSwitch.Extensions:AddressEditorSmartLayout Microsoft.LightSwitch.Extensions:AddressEditorSmartLayout
WebLink Microsoft.LightSwitch.Extensions:WebLink Microsoft.LightSwitch.Extensions:WebLink
WebAddressEditor Microsoft.LightSwitch.Extensions:WebAddressEditor Microsoft.LightSwitch.Extensions:WebAddressEditor
Control Type ViewID String (Project that hasn’t been upgraded with the HTML client) ViewID String (Project that has been upgraded with the HTML client)
Screen Controls
Screen Microsoft.LightSwitch:Screen Microsoft.LightSwitch.RichClient:Screen
Value and Picker Controls
TextBox Microsoft.LightSwitch:TextBox Microsoft.LightSwitch.RichClient:TextBox
Label Microsoft.LightSwitch:Label Microsoft.LightSwitch.RichClient:Label
CheckBox Microsoft.LightSwitch:CheckBox Microsoft.LightSwitch.RichClient:CheckBox
DateTimePicker Microsoft.LightSwitch:DateTimePicker Microsoft.LightSwitch.RichClient:DateTimePicker
DateTimeViewer Microsoft.LightSwitch:DateTimeViewer Microsoft.LightSwitch.RichClient:DateTimeViewer
DatePicker Microsoft.LightSwitch:DatePicker Microsoft.LightSwitch.RichClient:DatePicker
DateViewer Microsoft.LightSwitch:DateViewer Microsoft.LightSwitch.RichClient:DateViewer
StaticImage Microsoft.LightSwitch:StaticImage Microsoft.LightSwitch.RichClient:StaticImage
StaticLabel Microsoft.LightSwitch:StaticLabel Microsoft.LightSwitch.RichClient:StaticLabel
EmailAddressViewerControl Microsoft.LightSwitch.Extensions:EmailAddressViewerControl Microsoft.LightSwitch.Extensions:EmailAddressViewerControl
EmailAddressEditorControl Microsoft.LightSwitch.Extensions:EmailAddressEditorControl Microsoft.LightSwitch.Extensions:EmailAddressEditorControl
ImageViewerControl Microsoft.LightSwitch.Extensions:ImageViewerControl Microsoft.LightSwitch.Extensions:ImageViewerControl
ImageEditorControl Microsoft.LightSwitch.Extensions:ImageEditorControl Microsoft.LightSwitch.Extensions:ImageEditorControl
MoneyViewerControl Microsoft.LightSwitch.Extensions:MoneyViewerControl Microsoft.LightSwitch.Extensions:MoneyViewerControl
MoneyEditorControl Microsoft.LightSwitch.Extensions:MoneyEditorControl Microsoft.LightSwitch.Extensions:MoneyEditorControl
PhoneNumberViewerControl Microsoft.LightSwitch.Extensions:PhoneNumberViewerControl Microsoft.LightSwitch.Extensions:PhoneNumberViewerControl
PhoneNumberEditorControl Microsoft.LightSwitch.Extensions:PhoneNumberEditorControl Microsoft.LightSwitch.Extensions:PhoneNumberEditorControl
PercentViewerControl Microsoft.LightSwitch.Extensions:PercentViewerControl Microsoft.LightSwitch.Extensions:PercentViewerControl
PercentEditorControl Microsoft.LightSwitch.Extensions:PercentEditorControl Microsoft.LightSwitch.Extensions:PercentEditorControl
..................Content has been hidden....................

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