Labs-Windows icon indicating copy to clipboard operation
Labs-Windows copied to clipboard

Support for assets in a samples/docs

Open niels9001 opened this issue 3 years ago • 1 comments

Problem Statement

Would be nice to include an Assets folder in the sample project template so you can refer to local images in a sample or doc.

niels9001 avatar Jul 19 '22 13:07 niels9001

We should make sure we can include any type of asset for samples as maybe there's a .json file or something that wants to be used for backing data.

But at least for images at the start, we should make sure they can be referenced in XAML samples (even if it needs the assembly name or something like this):

<Image Source="ms-appx://ProjectTemplateExperiment.Samples/FolderInSamplesProject/MyImageFile.png"/>
<!-- Or ideally short-hand: -->
<Image Source="ms-appx:///FolderInSamplesProject/MyImageFile.png"/>
<Image Source="FolderInSamplesProject/MyImageFile.png"/>

But also easily in the Markdown as well:

![Short Description](FolderInSamplesProject/MyImageFile.png "Longer Description text.")

michael-hawker avatar Jul 19 '22 14:07 michael-hawker