[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

You can use the $MPElement variable when you need to retrieve the GUID of any Management Pack element or sub-element of a Management Pack element.

Xml
$MPElement[Name=” ElementName ”]/SubElementName$

Remarks

The following table describes each of the sections in the $MPElement syntax.

Syntax Section Description

$MPElement

The name of the variable that you must use. Type as is.

Name=ElementName

The value of the ID attribute of a management pack element. The Management Pack element created in this element can be defined in your management pack or in another management pack or library. If this element is defined in another management pack or library, you must prepend the alias of the management pack or library that it is defined in by using the Alias! notation.

SubElementName

Retrieves the GUID of an object that is defined in a child element of the Management Pack element defined in the class name section of this variable. SubElementName is required only if the GUID you must retrieve is in a child element that is no more than one level down from the parent element.

The following example defines a view that displays all installed management packs from within the console. The ViewStrings XML element contains all strings that are to be displayed in the view. Each view string refers to an $MPElement variable as its value. The $MPElement variable resolves to the GUID of the StringResource management pack element. The GUID is used internally by the view to extract the string value of that element.

  Copy Code
<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="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://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="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mux="http://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>