TargetedContentCollection.Path Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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();
}
}