Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DesignSurface.View Property

Gets the view for the root designer.

Namespace:  System.ComponentModel.Design
Assembly:  System.Design (in System.Design.dll)
public Object View { get; }

Property Value

Type: System.Object
The view for the root designer.
ExceptionCondition
InvalidOperationException

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.

NotSupportedException

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

ObjectDisposedException

The IDesignerHost attached to the DesignSurface has been disposed.

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.

The following code example shows how View hides view technologies.

[C#]

IRootDesigner d;

ViewTechnology[] supported = d.SupportedTechnologies;

return d.GetView(supported[0]);

.NET Framework

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

Windows Phone 8.1, Windows Phone 8, 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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.