A base attribute for declaring views. See example code below.

Namespace:  MVCSharp.Core.Configuration.Views
Assembly:  MVCSharp (in MVCSharp.dll)
Version: 0.8.5217.34148

Syntax

C#
public class ViewAttribute : Attribute
Visual Basic (Declaration)
Public Class ViewAttribute _
	Inherits Attribute
Visual C++
public ref class ViewAttribute : public Attribute

Remarks

ViewAttribute attributes are converted to ViewInfo objects by an instance of the MVCConfiguration.ViewInfosProviderType type.

Note that different presentation mechanisms may require different ViewAttribute descendants to declare views. For instance see WinformsViewAttribute and WebformsViewAttribute attributes.

Examples

Below we declare a view type that should be used for the MyTask.MyView view within the MyTask task.
CopyC#
[WinformsView(typeof(MyTask), MyTask.MyView)]
class MyView : IView
{
    ...
}

Inheritance Hierarchy

See Also