Portal Metadata Online

This sample illustrates a simple way of querying the Portal metadata/properties and retrieving featuredItems using the Portal API. To use the sample, Click on Initialize button to initialize the portal. Once the portal is initialized , the portal metadata is displayed.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.PortalMetadata"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009">

    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
            <DataTemplate x:Key="PortalGroupTemplate">
                <StackPanel Margin="2">
                    <TextBlock Text="{Binding Title, StringFormat='Title: {0}'}" FontWeight="Bold"/>
                    <TextBlock Text="{Binding Snippet, StringFormat='Snippet: {0}'}" TextWrapping="Wrap" Width="500"/>
                    <TextBlock Text="{Binding Owner, StringFormat='Owner: {0}'}" />
                    <TextBlock Text="{Binding CreationDate, StringFormat='Creation Date: {0}'}" />
                </StackPanel>
            </DataTemplate>

        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="35"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="2">
            <TextBlock Text="Portal Url:" Margin="10,5,5,5" VerticalAlignment="Center" HorizontalAlignment="Center"/>
            <TextBox x:Name="PortalUrltextbox" Text="http://www.arcgis.com/sharing/rest"
                             HorizontalAlignment="Left" VerticalAlignment="Center" Width="250" Margin="5"/>
            <Button Content="Initialize" Click="LoadPortalInfo_Click" Height="25"/>
        </StackPanel>

        <Grid Margin="2" Grid.Row="1" Grid.Column="0">
            <TextBlock HorizontalAlignment="Left" Text="Portal Details" 
                       VerticalAlignment="Top" Margin="15,10,0,0" FontSize="12" 
                       FontWeight="Bold"/>
            <ListBox x:Name="PropertiesListBox" Margin="5,35,5,5" />
        </Grid>

        <Grid Margin="2" Grid.Row="1" Grid.Column="1">
            <TextBlock HorizontalAlignment="Left" Text="Featured Maps" 
                       VerticalAlignment="Top" Margin="15,10,0,0" FontSize="12" 
                       FontWeight="Bold"/>
            <ListBox x:Name="FeaturedMapsList" Margin="5,35,5,5">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="{Binding ThumbnailUri}" Margin="5" Stretch="None" />
                            <StackPanel Orientation="Vertical">
                                <TextBlock Text="{Binding Title, StringFormat='Title: {0}'}"/>
                                <TextBlock Text="{Binding Type, StringFormat='Type: {0}'}"/>
                                <TextBlock Text="{Binding Owner, StringFormat='Owner: {0}'}"/>
                                <TextBlock Text="{Binding CreationDate, StringFormat='Creation Date: {0}'}"/>
                            </StackPanel>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </Grid>
</UserControl>
 
Sample code usage restrictions
5/16/2014