Share via


View

Applies To: System Center Service Manager 2010

Represents an implementation of a view type definition.

Schema Hierarchy

ManagementPack
  Presentation
    Views
      View

Syntax

<View ID=”ViewID” Comment=”Comment” Accessibility=”Public/Internal” Target=”TargetClassID” Enabled=”True/False” TypeID=”GridViewType/OverviewType” Visible=”True/False”>
   <Category>CategoryName</Category>
</View>

Attributes and Elements

The following sections describe attributes, child elements, and the parent element of the View element.

Attributes

Attribute Description

ID

Required attribute. Represents the identity of the element. To learn how to identify your element in a management pack, see Element Identity and Namespace Conventions.

Comment

Optional attribute. Represents commentary by the management pack author.

Enabled

Required attribute. Defines whether or not this view is by default enabled or disabled.

Target

Required attribute. The ID of the targeted class type or type projection.

TypeID

Optional attribute. Represents the view type that this view implements. Can either be “GridViewType” or “OverviewType”.

Visible

Optional attribute. Defines whether or not this view is visible to the user. Default value is true. The user can set the value of this attribute through the console.

Accessibility Attribute Values

Value Description

Public

Indicates that the module type definition is visible to external management packs.

Internal

Indicates that the module type definition is not visible to external management packs.

TypeID Attribute Values

Value Description

OverviewType

Located within the Microsoft.EnterpriseManagement.ServiceManager.UI.Administration management pack, this view type is used to surface overview content for a console node.

GridViewType

Located within the Microsoft.EnterpriseManagement.ServiceManager.UI.Console management pack, this view type is used to display a list of instances of the specified target entity.

Child Elements

Element Description

Category (View)

Required element. Represents the category name of the view.

Parent Elements

Element Description

Views

Contains view type implementations in a management pack.

Remarks

When you define a view against a targeted ClassType or TypeProjection element, the view will display all objects and/or properties of that class type or type projection that you allow to be surfaced in the view. Each view type requires XML configuration content that provides the data that is required for rendering within the view.

For your view to be displayed in the console, you must define a Folder element to contain it. After defining the Folder element, you then must define a FolderItem element to associate that folder with the view.

A display string for each view should be defined in the display string section of the management pack for at least one language. For more information, see DisplayStrings.

Example

The following XML sample shows how to associate a View element with a Folder element by using the FolderItem definition. In this case, the Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Overview view will be placed under the top-level administration folder in the console.

<View ID="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Overview" Target="System!System.Entity" Enabled="true" TypeID="OverviewType" Accessibility="Public">
  <Category>Overview</Category>
  ...
</View>
…
<Folder ID="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.Folder.Root" ParentFolder="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.Folder" Accessibility="Public" />
…
<FolderItem ID="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.FolderItem.Overview" ElementID="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Overview" Folder="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.Folder.Root" />
      

The following XML sample shows the implementation of the GridViewType view type, which displays a list of all installed management packs when the user clicks Management Packs in the Administration section of the console.

<View ID="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.ManagementPack" Target="System!System.Entity" Enabled="true" TypeID="Console!GridViewType" Accessibility="Public">
  <Category>NotUsed</Category>
  <Data>
    <Adapters>
      <Adapter AdapterName="dataportal:ManagementPackAdapter">
        <AdapterAssembly>Microsoft.EnterpriseManagement.UI.SdkDataAccess</AdapterAssembly>
        <AdapterType>Microsoft.EnterpriseManagement.UI.SdkDataAccess.DataAdapters.ManagementPackAdapter</AdapterType>
      </Adapter>
      <Adapter AdapterName="viewframework://adapters/ListDefault">
        <AdapterAssembly>Microsoft.EnterpriseManagement.UI.ViewFramework</AdapterAssembly>
        <AdapterType>Microsoft.EnterpriseManagement.UI.ViewFramework.ListSupportAdapter</AdapterType>
      </Adapter>
    </Adapters>
    <ItemsSource>
      <ListSupportClass DataTypeName="" SupportAdapterName="viewframework://adapters/ListDefault" AdapterName="dataportal:ManagementPackAdapter" DataSource="mom:ManagementGroup" IsRecurring="True" RecurrenceFrequency="{x:Static s:Int32.MaxValue}" xmlns="clr-namespace:Microsoft.EnterpriseManagement.UI.ViewFramework;assembly=Microsoft.EnterpriseManagement.UI.ViewFramework" xmlns:av="https://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib">
        <ListSupportClass.Parameters>
          <QueryParameter Parameter="VisibleManagementPacks" Value="true" />
        </ListSupportClass.Parameters>
      </ListSupportClass>
    </ItemsSource>
    <Criteria />
  </Data>
  <Presentation>
    <Columns>
      <mux:ColumnCollection xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml" xmlns:mux="https://schemas.microsoft.com/SystemCenter/Common/UI/Views/GridView" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:data="clr-namespace:Microsoft.EnterpriseManagement.UI.SdkDataAccess.Common;assembly=Microsoft.EnterpriseManagement.UI.SdkDataAccess" xmlns:datebinding="clr-namespace:Microsoft.EnterpriseManagement.UI.SdkDataAccess.Common;assembly=Microsoft.EnterpriseManagement.UI.SdkDataAccess">
        <mux:Column Name="name" Width="300" DisplayName="Header_Name" Property="DisplayName" DataType="s:String">
          <mux:Column.CellTemplate>
            <DataTemplate>
              <DockPanel ToolTip="{Binding DisplayName}">
                <Image Source="{Binding Path=Image, Converter={x:Static data:ImageConverter.Default}}" Width="16" Height="16" RenderOptions.BitmapScalingMode="NearestNeighbor" />
                <TextBlock AutomationProperties.Name="{Binding DisplayName}" Text="{Binding DisplayName}" VerticalAlignment="Center" Margin="5,0,0,0" />
              </DockPanel>
            </DataTemplate>
          </mux:Column.CellTemplate>
        </mux:Column>
        <mux:Column Name="description" DisplayMemberBinding="{Binding Path=Description}" Width="300" DisplayName="Header_Description" Property="Description" DataType="s:String" />
        <mux:Column Name="sealed" Width="75" DisplayName="Header_Sealed" Property="Sealed" DataType="s:String">
          <mux:Column.CellTemplate>
            <DataTemplate>
              <DockPanel>
                <TextBlock Text="{Binding Path=Sealed, Converter={x:Static data:BooleanConverter.Default}}"/>
              </DockPanel>
            </DataTemplate>
          </mux:Column.CellTemplate>
        </mux:Column>
        <mux:Column Name="version" DisplayMemberBinding="{Binding Path=Version}" Width="75" DisplayName="Header_Version" Property="Version" DataType="s:String" />
        <mux:Column Name="timeCreated" DisplayMemberBinding="{datebinding:DateBinding Path=TimeCreated}" Width="300" DisplayName="Header_Created" Property="TimeCreated" DataType="s:DateTime" />
        <mux:Column Name="lastModified" DisplayMemberBinding="{datebinding:DateBinding Path=LastModified}" Width="120" DisplayName="Header_Last_Modified" Property="LastModified" DataType="s:DateTime" />
      </mux:ColumnCollection>
    </Columns>
    <ViewStrings>
      <ViewString ID="Header_Name">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.ManagementPack.Header_Name"]$</ViewString>
      <ViewString ID="Header_Description">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.ManagementPack.Header_Description"]$</ViewString>
      <ViewString ID="Header_Sealed">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.ManagementPack.Header_Sealed"]$</ViewString>
      <ViewString ID="Header_Version">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.ManagementPack.Header_Version"]$</ViewString>
      <ViewString ID="Header_Created">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.ManagementPack.Header_Created"]$</ViewString>
      <ViewString ID="Header_Last_Modified">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.ManagementPack.Header_Last_Modified"]$</ViewString>
    </ViewStrings>
  </Presentation>
</View>

The following XML sample shows the implementation of the OverviewType view type, which is displayed when the user clicks the Administration node in the console.

<View ID="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Overview" Target="System!System.Entity" Enabled="true" TypeID="OverviewType" Accessibility="Public">
  <Category>Overview</Category>
  <Configuration>
    <Definitions>
      <overview:XamlDefinition
        xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:overview="https://schemas.microsoft.com/SystemCenter/Common/UI/Views/Overview"
        xmlns:views="https://schemas.microsoft.com/SystemCenter/Common/UI/Views"
        ID="Tile1">
        <Grid xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:local="clr-namespace:Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.OverviewPage;assembly=Microsoft.EnterpriseManagement.ServiceManager.UI.Administration"
              views:OverviewTile.TileIconSource="pack://application:,,,/Microsoft.EnterpriseManagement.ServiceManager.UI.Administration;component/Resources/Generic_New_32.png"
              views:OverviewTile.ViewTitle="{x:Static local:OverviewPageResources.Header_GettingStarted}"
              views:OverviewTile.ViewSubtitle="{x:Static local:OverviewPageResources.Text_GettingStarted}"
              views:OverviewTile.CustomizeButtonState="Hidden"
              views:OverviewTile.HelpButtonState="Hidden">
          <local:GettingStarted />
        </Grid>
      </overview:XamlDefinition>
      <overview:XamlDefinition
        xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:overview="https://schemas.microsoft.com/SystemCenter/Common/UI/Views/Overview"
        xmlns:views="https://schemas.microsoft.com/SystemCenter/Common/UI/Views"
        ID="Tile2">
        <Grid xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:local="clr-namespace:Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.OverviewPage;assembly=Microsoft.EnterpriseManagement.ServiceManager.UI.Administration"
              views:OverviewTile.ViewTitle="{x:Static local:OverviewPageResources.Header_Settings}"
              views:OverviewTile.HeaderText="{x:Static local:OverviewPageResources.Text_Settings}"
              views:OverviewTile.CustomizeButtonState="Hidden"
              views:OverviewTile.HelpButtonState="Hidden">
          <local:Settings />
        </Grid>
      </overview:XamlDefinition>
    </Definitions>
    <Presentation>
      <Header>
        <views:PageHeader xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
                          xmlns:views="https://schemas.microsoft.com/SystemCenter/Common/UI/Views/Overview"
                          xmlns:local="clr-namespace:Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.OverviewPage;assembly=Microsoft.EnterpriseManagement.ServiceManager.UI.Administration"
                          Title="{x:Static local:OverviewPageResources.Header_AdministrationOverview}"
                          Content="{x:Static local:OverviewPageResources.Text_AdministrationOverview}">
          <views:PageHeader.Icon>
            <UIViews:TileIcon xmlns:UIViews="https://schemas.microsoft.com/SystemCenter/Common/UI/Views"
                              Source="pack://application:,,,/Microsoft.EnterpriseManagement.ServiceManager.UI.Administration;component/Resources/Icon_SCSM_Administration_64.png" />
          </views:PageHeader.Icon>
        </views:PageHeader>
      </Header>
      <Content>
        <ScrollViewer xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation" VerticalScrollBarVisibility="Auto">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <views:ViewTile xmlns:views="https://schemas.microsoft.com/SystemCenter/Common/UI/Views/Overview" Definition="{views:Definition Tile1}" MaxHeight="1000" Grid.Row="0" />
            <!--<views:Tile xmlns:views="https://schemas.microsoft.com/SystemCenter/Common/UI/Views/Overview" Definition="{views:Definition Tile2}" MaxHeight="1000" Grid.Row="1"/>-->
          </Grid>
        </ScrollViewer>
      </Content>
    </Presentation>
  </Configuration>
</View>

See Also

Reference

Folder
FolderItem
Views

Other Resources

ViewType