Modifier

Partager via


View Element

Defines a view that displays one or more .NET objects. There is no limit to the number of views that can be defined in a formatting file.

Schema

  • Configuration Element
  • ViewDefinitions Element
  • View Element

Syntax

<View>
  <Name>Friendly name of view.</Name>
  <OutOfBand />
  <ViewSelectedBy>...</ViewSelectedBy>
  <Controls>...</Controls>
  <GroupBy>...</GroupBy>
  <TableControl>...</TableControl>
  <ListControl>...</ListControl>
  <WideControl>...</WideControl>
  <CustomControl>...</CustomControl>
</View>

Attributes and Elements

The following sections describe the attributes, child elements, and the parent element of the View element. You must specify one and only one of the control child elements, and you must specify the name of the view and the objects that use the view. Defining custom controls, how to group objects, and specifying if the view is out-of-band are optional.

Attributes

None.

Child Elements

Element Description
Controls Element for View Optional element.

Defines a set of controls that can be referenced by their name from within the view.
CustomControl Element Optional element.

Defines a custom control format for the view.
GroupBy Element for View Optional element.

Defines how the members of the .NET objects are grouped.
ListControl Element Optional element.

Defines a list format for the view.
Name Element for View Required element.

Specifies the name used to reference the view.
OutOfBand Optional element

When OutOfBand is true, the view applies regardless of previous objects that may have selected a different view.
TableControl Element Optional element.

Defines a table format for the view.
ViewSelectedBy Element for View Required element.

Defines the .NET objects that this view displays.
WideControl Element Optional element.

Defines a wide (single value) list format for the view.

Parent Elements

Element Description
ViewDefinitions Element Defines the views used to display objects.

Remarks

For more information about the components of different views and custom controls, see the following topics:

Example

This example shows a View element that defines a table view for the System.Serviceprocess.Servicecontroller object.

<ViewDefinitions>
  <View>
    <Name>service</Name>
    <ViewSelectedBy>
      <TypeName>System.ServiceProcess.ServiceController</TypeName>
    </ViewSelectedBy>
    <TableControl>...</TableControl>
  </View>
</ViewDefinitions>

See Also

ViewDefinitions Element

Name Element for View

ViewSelectedBy Element

Controls Element for View

GroupBy Element for View

TableControl Element

ListControl Element

WideControl Element

CustomControl Element

Writing a PowerShell Formatting File