Share via


StringResource

Applies To: System Center Service Manager 2010

Represents a localizable alert message.

Schema Hierarchy

ManagementPack
  Presentation
    StringResources
      StringResource

Syntax

<StringResource ID=”StringResourceID”/>

Attributes and Elements

The following sections describe attributes, child elements, and the parent element of the StringResource 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.

Child Elements

None.

Parent Elements

Element Description

StringResources

Contains all string resource definitions in a management pack.

Remarks

String resources are used to represent localizable alert message strings. The actual string can be found in the language pack’s DisplayString section of the management pack. Each language pack in the management pack must define a DisplayString element for every string resource that is declared in the string resources section.

Example

The following XML sample illustrates how to define a string resource that refers to display string in an English language pack. In this case, the string is used to display a column header in a grid view type View element.

<StringResource ID="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Connector.Header_Name" />
…
<LanguagePack ID="ENU" IsDefault="true">
   <DisplayStrings>
      <DisplayString ElementID="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Connector.Header_Name">
          <Name>Name</Name>
          <Description>Name</Description>
        </DisplayString>
   </DisplayStrings>
</LanguagePack>
…
<View ID="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Connector" Target="LfxLib!System.LinkingFramework.DataSource" Enabled="true" TypeID="Console!GridViewType" Accessibility="Public">
  <Category>NotUsed</Category>
  <Data>
    <Adapters>
      <Adapter AdapterName="dataportal:EnterpriseManagementObjectProjectionAdapter">
        <AdapterAssembly>Microsoft.EnterpriseManagement.UI.SdkDataAccess</AdapterAssembly>
        <AdapterType>Microsoft.EnterpriseManagement.UI.SdkDataAccess.DataAdapters.EnterpriseManagementObjectProjectionAdapter</AdapterType>
      </Adapter>
      <Adapter AdapterName="viewframework://Adapters/AdvancedList">
        <AdapterAssembly>Microsoft.EnterpriseManagement.UI.ViewFramework</AdapterAssembly>
        <AdapterType>Microsoft.EnterpriseManagement.UI.ViewFramework.AdvancedListSupportAdapter</AdapterType>
      </Adapter>
    </Adapters>
    <ItemsSource>
      <AdvancedListSupportClass DataTypeName="" AdapterName="viewframework://Adapters/AdvancedList" FullUpdateAdapter="dataportal:EnterpriseManagementObjectProjectionAdapter" DataSource="mom:ManagementGroup" FullUpdateFrequency="1" Streaming="true" 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" IsRecurring="true" RecurrenceFrequency="{x:Static s:Int32.MaxValue}">
        <AdvancedListSupportClass.Parameters>
          <QueryParameter Parameter="TypeProjectionId" Value="$MPElement[Name='LfxLib!Microsoft.SystemCenter.LinkingFramework.SyncStatus.Projection']$" />
        </AdvancedListSupportClass.Parameters>
      </AdvancedListSupportClass>
    </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="displayName" DisplayMemberBinding="{Binding Path=DisplayName}" Width="200" DisplayName="Header_Name" Property="DisplayName" DataType="s:String" />
        <mux:Column Name="enabled" Width="100" DisplayMemberBinding="{data:BooleanBinding Path=Enabled}" DisplayName="Header_Enabled" Property="Enabled" DataType="s:Boolean" />
        <mux:Column Name="dataProviderName" Width="200" DisplayMemberBinding="{Binding Path=DataProviderDisplayName}" DisplayName="Header_DataProviderName" Property="DataProviderDisplayName" DataType="s:String"/>
        <!--<mux:Column Name="dataProviderName" Width="200" DisplayName="Header_DataProviderName" Property="DataProviderDisplayName" DataType="s:String">
                <mux:Column.CellTemplate>
                  <DataTemplate>
                    <DockPanel>
                      <TextBlock Text="{Binding Path=DataProviderDisplayName, Converter={x:Static conn:DataProviderNameConverter.Default}}"/>
                    </DockPanel>
                  </DataTemplate>
                </mux:Column.CellTemplate>
              </mux:Column>-->
        <mux:Column Name="lastRunStartTime" DisplayMemberBinding="{datebinding:DateBinding Path=SyncStatus.LastRunStartTime}" Width="100" DisplayName="Header_Start_Time" Property="SyncStatus.LastRunStartTime" DataType="s:DateTime" />
        <mux:Column Name="lastRunFinishTime" DisplayMemberBinding="{datebinding:DateBinding Path=SyncStatus.LastRunFinishTime}" Width="100" DisplayName="Header_Finish_Time" Property="SyncStatus.LastRunFinishTime" DataType="s:DateTime" />
        <mux:Column Name="syncStatusDisplayName" DisplayMemberBinding="{Binding Path=SyncStatus.Status.DisplayName}" Width="100" DisplayName="Header_Status" Property="SyncStatus.Status.DisplayName" DataType="s:String" />
        <mux:Column Name="syncPercent" DisplayMemberBinding="{Binding Path=SyncStatus.SyncPercent}" Width="100" DisplayName="Header_Percentage" Property="SyncStatus.SyncPercent" DataType="s:Int32" />
      </mux:ColumnCollection>
    </Columns>
    <ViewStrings>
      <ViewString ID="Header_Name">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Connector.Header_Name"]$</ViewString>
      <ViewString ID="Header_Enabled">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Connector.Header_Enabled"]$</ViewString>
      <ViewString ID="Header_DataProviderName">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Connector.Header_DataProviderName"]$</ViewString>
      <ViewString ID="Header_Start_Time">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Connector.Header_Start_Time"]$</ViewString>
      <ViewString ID="Header_Finish_Time">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Connector.Header_Finish_Time"]$</ViewString>
      <ViewString ID="Header_Status">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Connector.Header_Status"]$</ViewString>
      <ViewString ID="Header_Percentage">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.View.Connector.Header_Percentage"]$</ViewString>
    </ViewStrings>
  </Presentation>
</View>

See Also

Reference

StringResources