Share via


Data UI Customization, Windows Forms Designer, Options Dialog Box

This dialog box defines which controls appear in the list of available controls for the items in the Data Sources Window. Each item in the Data Sources window has a control list to select from prior to dragging onto the form in your Windows application. The controls available for each item are determined by the data type of the item. Each data type has a list of valid associated controls defined in this dialog box, including a default control. When you drag an item from the Data Sources window onto a form without selecting a control, the default control for the data type of the selected item is added to the form.

You can customize the list of Associated Controls by selecting and clearing the check boxes of available controls in the list for each data type. You can add controls to the list by adding controls to the Toolbox that implement one of the following data-binding attributes: DefaultBindingPropertyAttribute or ComplexBindingPropertiesAttribute. In other words, add a control to the Toolbox that implements one of the data-binding attributes and it will appear in the list. For information about adding controls to the Toolbox, see How to: Manipulate Toolbox Tabs.

Using this dialog box, you can customize the list of controls that appear for items in the Data Sources window. For more information, see How to: Add Custom Controls to the Data Sources Window.

Display the Data UI Customization dialog box by clicking the Tools menu and choosing the Options command. Then, in the Options dialog box, expand the Windows Forms Designer section and select Data UI Customization.

  • Data Type
    Displays a list of types with which you associate controls. Tables are represented as [List] types, and columns are represented as the actual data type of the column in the underlying data store.

  • Associated Controls
    Displays a list of controls with which you associate data types. If you want to associate a particular control type with the type selected in the Data Type list, select the corresponding check box. Clear the check box to remove an association. Checked controls appear in the shortcut menu presented by the Data Sources window for a database column bound to the associated type.

  • Set Default
    Assigns the selected control type to be the default for the selected data type. The default control appears as the first selection in the shortcut menu presented by the Data Sources window for a database column. Only one control type may be assigned as the default for a data type.

  • Clear Default
    Removes the designation of a control as the default for the selected data type. If there is no default for the selected data type, [None] appears as the first selection in the shortcut menu presented by the Data Sources window for a database column bound to the associated type.

See Also

Tasks

How to: Add Custom Controls to the Data Sources Window

How to: Set the Control to be Created when Dragging from the Data Sources Window

Walkthrough: Creating a Windows Forms User Control that Supports Simple Data Binding

Walkthrough: Creating a Windows Forms User Control that Supports Complex Data Binding

Walkthrough: Creating a Windows Forms User Control that Supports Lookup Databinding

Reference

Data Sources Window

Toolbox

Concepts

Data Sources Overview

Binding Windows Forms Controls to Data in Visual Studio

Other Resources

Windows Forms Designer Dialog Boxes