ViewSelectedBy Element

Defines the .NET objects that are displayed by the view. Each view must specify at least one .NET object.

Schema

  • ViewDefinitions Element
  • View Element
  • ViewSelectedBy Element

Syntax

<ViewSelectedBy>
  <TypeName>Nameof.NetType</TypeName>
  <SelectionSetName>SelectionSet</SelectionSetName>
</ViewSelectedBy>

Attributes and Elements

The following sections describe the attributes, child elements, and parent element of the ViewSelectedBy element. This element must contain at least one TypeName or SelectionSetName child element. There is no limit to the number of child elements that can be specified nor is their order significant.

Attributes

None.

Child Elements

Element Description
TypeName Element for ViewSelectedBy Optional element.

Specifies a .NET object that is displayed by the view.
SelectionSetName Element for ViewSelectedBy Optional element.

Specifies a set of .NET objects that are displayed by the view.

Parent Elements

Element Description
View Element Defines a view that displays one or more .NET objects.

Remarks

For more information about how this element is used in different views, see Table View Components, List View Components, Wide View Components, and Custom Control Components.

The SelectionSetName element is used when the formatting file defines a set of objects that are displayed by multiple views. For more information about how selection sets are defined and referenced, see Defining Sets of Objects.

Example

The following example shows how to specify the System.Serviceprocess.Servicecontroller object for a list view. The same schema is used for table, wide, and custom views.

<View>
  <Name>System.ServiceProcess.ServiceController</Name>
  <ViewSelectedBy>
    <TypeName>System.ServiceProcess.ServiceController</TypeName>
  </ViewSelectedBy>
  <ListControl>...</ListControl>
</View>

See Also

Creating a List View

Creating a Table View

Creating a Wide View

Creating Custom Controls

Defining Selection Sets

SelectionSetName Element for ViewSelectedBy

TypeName Element

Writing a PowerShell Formatting File