Jaa


TargetedContentCollection.Path Property

Definition

Gets the path to an item in the content collection.

public:
 property Platform::String ^ Path { Platform::String ^ get(); };
winrt::hstring Path();
public string Path { get; }
var string = targetedContentCollection.path;
Public ReadOnly Property Path As String

Property Value

String

Platform::String

winrt::hstring

Windows requirements

App capabilities
secondaryAuthenticationFactor

Examples

This example shows how to get a specific object from a known path. Specifically, item 0 under collection 1 ("\collection1\item1") as described by the data contract.

We assume that container is a pre-existing subscription content container.

Finally, we launch the URI associated with the item.

private async void LaunchObjectUriFromPath(TargetedContentContainer container)
{
    TargetedContentObject contentObject = container.SelectSingleObject("//collection[1]/item[0]");

    await contentObject.Item.Properties["onClick"].Uri.LauchUriAsync();
    }
}

Applies to