DesignSurface.View Property

Definition

Gets the view for the root designer.

public:
 property System::Object ^ View { System::Object ^ get(); };
public object View { get; }
member this.View : obj
Public ReadOnly Property View As Object

Property Value

The view for the root designer.

Exceptions

The design surface is not loading, the designer loader has not yet created a root designer, or the design surface finished the load, but failed. More information may available in the InnerException.

The designer loaded, but it does not offer a view compatible with this design surface.

The IDesignerHost attached to the DesignSurface has been disposed.

Examples

The following code example shows how View hides view technologies.

IRootDesigner d;  

ViewTechnology[] supported = d.SupportedTechnologies;  

return d.GetView(supported[0]);

Remarks

The BeginLoad method must be called beforehand to start the loading process. It is possible to return a view before the designer loader finishes loading because the root designer, which supplies the view, is the first object created by the designer loader. If a view is unavailable, BeginLoad raises an exception.

The notion of a view technology is obsolete. But, it remains in the interfaces for root designers for backward compatibility. Its use is hidden from anyone using DesignSurface objects. The View property hides view technologies by passing the supported technologies back into the root designer.

Applies to