Export (0) Print
Expand All

DetailsViewDesigner Class

Provides design-time support in a visual designer for the DetailsView control.

Namespace:  System.Web.UI.Design.WebControls
Assembly:  System.Design (in System.Design.dll)

public ref class DetailsViewDesigner : public DataBoundControlDesigner

The DetailsViewDesigner type exposes the following members.

  NameDescription
Public methodDetailsViewDesignerInfrastructure. Initializes a new instance of the DetailsViewDesigner class.
Top

  NameDescription
Public propertyActionListsGets the designer action list collection for this designer. (Overrides DataBoundControlDesigner::ActionLists.)
Public propertyAllowResizeGets a value indicating whether the control can be resized in the design-time environment. (Inherited from ControlDesigner.)
Public propertyAssociatedComponentsGets the collection of components associated with the component managed by the designer. (Inherited from ComponentDesigner.)
Public propertyAutoFormatsGets the collection of automatic formatting schemes to display in the Auto Format dialog box. (Overrides ControlDesigner::AutoFormats.)
Public propertyBehavior Obsolete. Gets or sets the DHTML behavior that is associated with the designer. (Inherited from HtmlControlDesigner.)
Public propertyComponentGets the component this designer is designing. (Inherited from ComponentDesigner.)
Public propertyDataBindingsGets the data bindings collection for the current control. (Inherited from HtmlControlDesigner.)
Protected propertyDataBindingsEnabledGets a value indicating whether data binding is supported by the containing region for the associated control. (Inherited from ControlDesigner.)
Public propertyDataMemberGets the shadowed DataMember property of the underlying data-bound control. (Inherited from DataBoundControlDesigner.)
Public propertyDataSourceGets or sets the value of the DataSource property for the associated control. (Inherited from BaseDataBoundControlDesigner.)
Public propertyDataSourceDesignerGets the designer of the data source of the underlying data-bound control. (Inherited from DataBoundControlDesigner.)
Public propertyDataSourceIDGets or sets the value of the DataSourceID property of the underlying BaseDataBoundControl object. (Inherited from BaseDataBoundControlDesigner.)
Protected propertyDesignerStateGets an object that is used to persist data for the associated control at design time. (Inherited from ControlDesigner.)
Public propertyDesignerViewGets the DesignerDataSourceView object associated with the data source of this designer. (Inherited from DataBoundControlDesigner.)
Protected propertyDesignTimeElement Obsolete. Gets the design-time object representing the control that is associated with the HtmlControlDesigner object on the design surface. (Inherited from HtmlControlDesigner.)
Protected propertyDesignTimeElementView Obsolete. Gets the view-control object for the control designer. (Inherited from ControlDesigner.)
Public propertyDesignTimeHtmlRequiresLoadComplete Obsolete. Gets a value indicating whether the design host must finish loading before the GetDesignTimeHtml method can be called. (Inherited from ControlDesigner.)
Public propertyExpressionsGets the expression bindings for the current control at design time. (Inherited from HtmlControlDesigner.)
Protected propertyHidePropertiesInTemplateModeInfrastructure. Gets a value indicating whether the properties of the associated control are hidden when the control is in template mode. (Inherited from ControlDesigner.)
Public propertyIDGets or sets the ID string for the control. (Inherited from ControlDesigner.)
Protected propertyInheritanceAttributeGets an attribute that indicates the type of inheritance of the associated component. (Inherited from ComponentDesigner.)
Protected propertyInheritedGets a value indicating whether this component is inherited. (Inherited from ComponentDesigner.)
Protected propertyInTemplateModeGets a value indicating whether the control is in either template viewing or editing mode in the design host. The InTemplateMode property is read-only. (Inherited from ControlDesigner.)
Public propertyIsDirty Obsolete. Gets or sets a value indicating whether the Web server control has been marked as changed. (Inherited from ControlDesigner.)
Protected propertyParentComponentGets the parent component for this designer. (Inherited from ComponentDesigner.)
Public propertyReadOnly Obsolete. Gets or sets a value indicating whether the properties of the control are read-only at design time. (Inherited from ControlDesigner.)
Protected propertyRootDesignerGets the control designer for the Web Forms page that contains the associated control. (Inherited from ControlDesigner.)
Protected propertySampleRowCountGets the number of sample rows for the associated control to display. (Overrides DataBoundControlDesigner::SampleRowCount.)
Protected propertyShadowPropertiesGets a collection of property values that override user settings. (Inherited from ComponentDesigner.)
Public propertyShouldCodeSerialize Obsolete. Gets or sets a value indicating whether to create a field declaration for the control in the code-behind file for the current design document during serialization. (Inherited from HtmlControlDesigner.)
Protected propertyTagGets an object representing the HTML markup element for the associated control. (Inherited from ControlDesigner.)
Public propertyTemplateGroupsGets a collection of template groups for the fields of the associated control. (Overrides ControlDesigner::TemplateGroups.)
Protected propertyUseDataSourcePickerActionListGets a value indicating whether the designer should include "Choose a data source" in its action list. (Inherited from DataBoundControlDesigner.)
Protected propertyUsePreviewControlGets a value indicating whether the designer should use a temporary copy, rather than the actual control associated with the designer, to generate the design-time markup. (Overrides ControlDesigner::UsePreviewControl.)
Public propertyVerbsGets the design-time verbs supported by the component that is associated with the designer. (Inherited from ComponentDesigner.)
Public propertyViewControlGets or sets a Web server control that can be used for previewing the design-time HTML markup. (Inherited from ControlDesigner.)
Public propertyViewControlCreatedGets or sets a value indicating whether a View control has been created for display on the design surface. (Inherited from ControlDesigner.)
Protected propertyVisibleGets a value that indicates whether the control is visible at design time. (Inherited from ControlDesigner.)
Top

  NameDescription
Protected methodConnectToDataSourceDisconnects events from the previous data source and connects them to the current data source. (Inherited from DataBoundControlDesigner.)
Protected methodCreateDataSourceInvokes the standard dialog box to create a new data source control, and sets the new data source control's ID to the DataSourceID property of the data-bound control. (Inherited from DataBoundControlDesigner.)
Protected methodCreateErrorDesignTimeHtml(String)Creates HTML markup to display a specified error message at design time. (Inherited from ControlDesigner.)
Protected methodCreateErrorDesignTimeHtml(String, Exception)Creates the HTML markup to display a specified exception error message at design time. (Inherited from ControlDesigner.)
Protected methodCreatePlaceHolderDesignTimeHtml()Provides a simple rectangular placeholder representation that displays the type and ID of the control. (Inherited from ControlDesigner.)
Protected methodCreatePlaceHolderDesignTimeHtml(String)Provides a simple rectangular placeholder representation that displays the type and ID of the control, and also additional specified instructions or information. (Inherited from ControlDesigner.)
Protected methodCreateViewControlReturns a copy of the associated control for viewing or rendering on the design surface. (Inherited from ControlDesigner.)
Protected methodDataBindBinds the associated control to the design-time data source. (Overrides DataBoundControlDesigner::DataBind(BaseDataBoundControl).)
Protected methodDisconnectFromDataSourceDisconnects the data-bound control from data source events. (Inherited from DataBoundControlDesigner.)
Public methodDispose()Releases all resources used by the ComponentDesigner. (Inherited from ComponentDesigner.)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the DataBoundControlDesigner object and optionally releases the managed resources. (Inherited from DataBoundControlDesigner.)
Public methodDoDefaultActionCreates a method signature in the source code file for the default event on the component and navigates the user's cursor to that location. (Inherited from ComponentDesigner.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAttempts to free resources by calling Dispose(false) before the object is reclaimed by garbage collection. (Inherited from ComponentDesigner.)
Public methodGetBoundsRetrieves the coordinates of the rectangle representing the boundaries for the control as displayed on the design surface. (Inherited from ControlDesigner.)
Protected methodGetDesignTimeDataSourceGets the design-time data source from either the associated DataSourceDesigner or the DataSource property. (Inherited from DataBoundControlDesigner.)
Public methodGetDesignTimeHtml()Gets the markup that is used to render the associated control at design time. (Overrides BaseDataBoundControlDesigner::GetDesignTimeHtml().)
Public methodGetDesignTimeHtml(DesignerRegionCollection)Gets the markup that is used to render the associated control at design time and populates a collection of designer regions. (Overrides ControlDesigner::GetDesignTimeHtml(DesignerRegionCollection).)
Public methodGetEditableDesignerRegionContentInfrastructure. Returns the content for an editable region of the design-time view of the associated control. (Overrides ControlDesigner::GetEditableDesignerRegionContent(EditableDesignerRegion).)
Protected methodGetEmptyDesignTimeHtmlProvides the markup that is used to render the control at design time if the control is empty or if the data source cannot be retrieved. (Inherited from BaseDataBoundControlDesigner.)
Protected methodGetErrorDesignTimeHtmlProvides the markup that is used to render the control at design time when an error has occurred. (Inherited from BaseDataBoundControlDesigner.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetPersistenceContentRetrieves the persistable inner HTML markup of the control at design time. (Inherited from ControlDesigner.)
Public methodGetPersistInnerHtml Obsolete. Retrieves the persistable inner HTML markup of the control. (Inherited from ControlDesigner.)
Protected methodGetSampleDataSourceGets dummy sample data to render the data-bound control on the design surface if sample data cannot be created from the DataSourceDesigner or DataSource properties. (Inherited from DataBoundControlDesigner.)
Protected methodGetServiceAttempts to retrieve the specified type of service from the design mode site of the designer's component. (Inherited from ComponentDesigner.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetViewRendering()Retrieves an object that contains the design-time markup for the content and regions of the associated control. (Inherited from ControlDesigner.)
Public methodInitializePrepares the designer to view, edit, and design the associated control. (Overrides BaseDataBoundControlDesigner::Initialize(IComponent).)
Public methodInitializeExistingComponentReinitializes an existing component. (Inherited from ComponentDesigner.)
Public methodInitializeNewComponentInitializes a newly created component. (Inherited from ComponentDesigner.)
Public methodInitializeNonDefault Obsolete. Initializes the settings for an imported component that is already initialized to settings other than the defaults. (Inherited from ComponentDesigner.)
Public methodInvalidate()Invalidates the whole area of the control that is displayed on the design surface and signals the control designer to redraw the control. (Inherited from ControlDesigner.)
Public methodInvalidate(Rectangle)Invalidates the specified area of the control that is displayed on the design surface and signals the control designer to redraw the control. (Inherited from ControlDesigner.)
Protected methodInvokeGetInheritanceAttributeGets the InheritanceAttribute of the specified ComponentDesigner. (Inherited from ComponentDesigner.)
Public methodIsPropertyBound Obsolete. Retrieves a value indicating whether the specified property on the associated control is data-bound. (Inherited from ControlDesigner.)
Public methodLocalizeUses the provided resource writer to persist the localizable properties of the associated control to a resource in the design host. (Inherited from ControlDesigner.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodOnAutoFormatAppliedCalled when a predefined, automatic formatting scheme has been applied to the associated control. (Inherited from ControlDesigner.)
Protected methodOnBehaviorAttached Obsolete. Called when a behavior is associated with the element. (Inherited from HtmlControlDesigner.)
Protected methodOnBehaviorDetaching Obsolete. Called when a behavior disassociates from the element. (Inherited from HtmlControlDesigner.)
Protected methodOnBindingsCollectionChanged Obsolete. Called when the data-binding collection changes. (Inherited from ControlDesigner.)
Protected methodOnClickCalled when a region of the design-time view for the associated control is clicked. (Overrides ControlDesigner::OnClick(DesignerRegionMouseEventArgs).)
Public methodOnComponentChangedCalled when the associated control changes. (Inherited from ControlDesigner.)
Public methodOnComponentChangingRepresents the method that will handle the ComponentChanging event for the associated control. (Inherited from ControlDesigner.)
Protected methodOnControlResize Obsolete. Called when the associated Web server control has been resized in the design host at design time. (Inherited from ControlDesigner.)
Protected methodOnDataSourceChangedCalled when the data source of the associated BaseDataBoundControl object changes. (Inherited from BaseDataBoundControlDesigner.)
Protected methodOnPaintCalled when the control designer draws the associated control on the design surface, if the CustomPaint value is true. (Inherited from ControlDesigner.)
Protected methodOnSchemaRefreshedCalled when the schema of the data source for the associated control changes. (Overrides BaseDataBoundControlDesigner::OnSchemaRefreshed().)
Public methodOnSetComponentDefaults Obsolete. Sets the default properties for the component. (Inherited from ComponentDesigner.)
Public methodOnSetParentProvides a way to perform additional processing when the associated control is attached to a parent control. (Inherited from HtmlControlDesigner.)
Protected methodPostFilterAttributesAllows a designer to change or remove items from the set of attributes that it exposes through a TypeDescriptor. (Inherited from ComponentDesigner.)
Protected methodPostFilterEventsAllows a designer to change or remove items from the set of events that it exposes through a TypeDescriptor. (Inherited from ComponentDesigner.)
Protected methodPostFilterPropertiesAllows a designer to change or remove items from the set of properties that it exposes through a TypeDescriptor. (Inherited from ComponentDesigner.)
Protected methodPreFilterAttributesAllows a designer to add to the set of attributes that it exposes through a TypeDescriptor. (Inherited from ComponentDesigner.)
Protected methodPreFilterEventsSets the list of events that are exposed at design-time for the TypeDescriptor object for the component. (Inherited from HtmlControlDesigner.)
Protected methodPreFilterPropertiesUsed by the designer to remove properties from or add properties to the display in the Properties grid or to shadow properties of the associated control. (Overrides DataBoundControlDesigner::PreFilterProperties(IDictionary).)
Protected methodRaiseComponentChangedNotifies the IComponentChangeService that this component has been changed. (Inherited from ComponentDesigner.)
Protected methodRaiseComponentChangingNotifies the IComponentChangeService that this component is about to be changed. (Inherited from ComponentDesigner.)
Public methodRaiseResizeEvent Obsolete. Raises the OnControlResize event. (Inherited from ControlDesigner.)
Public methodRegisterCloneRegisters internal data in a cloned control. (Inherited from ControlDesigner.)
Public methodSetEditableDesignerRegionContentInfrastructure. Specifies content for an editable region of the design-time view of the associated control. (Overrides ControlDesigner::SetEditableDesignerRegionContent(EditableDesignerRegion, String).)
Protected methodSetRegionContentSpecifies the content for an editable region in the design-time view of the control. (Inherited from ControlDesigner.)
Protected methodSetViewFlagsAssigns the specified bitwise ViewFlags enumeration to the specified flag value. (Inherited from ControlDesigner.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodUpdateDesignTimeHtmlRefreshes the design-time HTML markup for the associated Web server control by calling the GetDesignTimeHtml method. (Inherited from ControlDesigner.)
Top

  NameDescription
Explicit interface implemetationPrivate propertyIDataBindingSchemaProvider::CanRefreshSchemaFor a description of this member, see CanRefreshSchema. (Inherited from DataBoundControlDesigner.)
Explicit interface implemetationPrivate methodIDataBindingSchemaProvider::RefreshSchemaFor a description of this member, see RefreshSchema. (Inherited from DataBoundControlDesigner.)
Explicit interface implemetationPrivate propertyIDataBindingSchemaProvider::SchemaFor a description of this member, see Schema. (Inherited from DataBoundControlDesigner.)
Explicit interface implemetationPrivate methodIDataSourceProvider::GetResolvedSelectedDataSourceFor a description of this member, see GetResolvedSelectedDataSource. (Inherited from DataBoundControlDesigner.)
Explicit interface implemetationPrivate methodIDataSourceProvider::GetSelectedDataSourceFor a description of this member, see GetSelectedDataSource. (Inherited from DataBoundControlDesigner.)
Explicit interface implemetationPrivate methodIDesignerFilter::PostFilterAttributesFor a description of this member, see the IDesignerFilter::PostFilterAttributes method. (Inherited from ComponentDesigner.)
Explicit interface implemetationPrivate methodIDesignerFilter::PostFilterEventsFor a description of this member, see the IDesignerFilter::PostFilterEvents method. (Inherited from ComponentDesigner.)
Explicit interface implemetationPrivate methodIDesignerFilter::PostFilterPropertiesFor a description of this member, see the IDesignerFilter::PostFilterProperties method. (Inherited from ComponentDesigner.)
Explicit interface implemetationPrivate methodIDesignerFilter::PreFilterAttributesFor a description of this member, see the IDesignerFilter::PreFilterAttributes method. (Inherited from ComponentDesigner.)
Explicit interface implemetationPrivate methodIDesignerFilter::PreFilterEventsFor a description of this member, see the IDesignerFilter::PreFilterEvents method. (Inherited from ComponentDesigner.)
Explicit interface implemetationPrivate methodIDesignerFilter::PreFilterPropertiesFor a description of this member, see the IDesignerFilter::PreFilterProperties method. (Inherited from ComponentDesigner.)
Explicit interface implemetationPrivate propertyITreeDesigner::ChildrenFor a description of this member, see the ITreeDesigner::Children property. (Inherited from ComponentDesigner.)
Explicit interface implemetationPrivate propertyITreeDesigner::ParentFor a description of this member, see the ITreeDesigner::Parent property. (Inherited from ComponentDesigner.)
Top

In a visual designer, when you switch from Source to Design view, the markup source code that describes the DetailsView control is parsed and a design-time version of the control is created on the design surface. When you switch back to Source view, the design-time control is persisted to markup source code and edited into the markup for the Web page.

The properties of the DetailsViewDesigner class provide the following functionality:

  • The ActionLists property returns a DesignerActionListCollection object, which typically contains an object that is derived from the DesignerActionList class for each level in the inheritance tree of the designer.

  • The AutoFormats property returns a collection of formatting schemes for display in the Auto Format dialog box.

  • The TemplateGroups property returns a collection of template groups for the fields of the associated DetailsView control and the top level DetailsView templates.

  • The UsePreviewControl property always returns true, indicating that the designer creates a temporary copy of the associated DetailsView control to generate the design-time markup.

The DetailsViewDesigner class methods provide the following functionality:

Design-time editable regions are not supported in the DetailsView control, so the GetEditableDesignerRegionContent and SetEditableDesignerRegionContent methods have no functionality.

The following code example shows how to extend the DetailsViewDesigner class to change the appearance of controls that are derived from the DetailsView control at design time.

The example derives the MyDetailsView control from the DetailsView. The MyDetailsView is simply a copy of the DetailsView control. The example also derives the MyDetailsViewDesigner class from DetailsViewDesigner and places a DesignerAttribute object for MyDetailsViewDesigner on the MyDetailsView control.

The MyDetailsViewDesigner overrides the SampleRowCount property to specify that the pager row of the design-time view of the MyDetailsView contain five page links. It overrides the PreFilterProperties method to make the NamingContainer property visible in the Property grid at design time. It overrides the GetDesignTimeHtml method to include the Caption property, if it is specified, as a new first row in the MyDetailsView grid at design time. If the BorderStyle property of the MyDetailsView is the NotSet or None value, the GetDesignTimeHtml draws a blue dashed border around the control to make its extent more visible.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft