Skip to content

Commit bacddd5

Browse files
Merge pull request #3723 from huypub/fix-blockquote-tag
remove blockquote tag
2 parents 62dcf6d + 45c2be5 commit bacddd5

File tree

4 files changed

+24
-26
lines changed

4 files changed

+24
-26
lines changed

uwp/app-resources/images-tailored-for-scale-theme-contrast.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,26 @@ Some common qualifiers for images are [scale](tailor-resources-lang-scale-contra
1717
## Qualify an image resource for scale, theme, and contrast
1818
The default value for the `scale` qualifier is `scale-100`. So, these two variants are equivalent (they both provide an image at scale 100, or scale factor 1).
1919

20-
<blockquote>
20+
2121
<pre>
2222
\Assets\Images\logo.png
2323
\Assets\Images\logo.scale-100.png
2424
</pre>
25-
</blockquote>
25+
2626

2727

2828
You can use qualifiers in folder names instead of file names. That would be a better strategy if you have several asset files per qualifier. For purposes of illustration, these two variants are equivalent to the two above.
2929

30-
<blockquote>
30+
3131
<pre>
3232
\Assets\Images\logo.png
3333
\Assets\Images\scale-100\logo.png
3434
</pre>
35-
</blockquote>
35+
3636

3737
Next is an example of how you can provide variants of an image resource&mdash;named `/Assets/Images/logo.png`&mdash;for different settings of display scale, theme, and high contrast. This example uses folder naming.
3838

39-
<blockquote>
39+
4040
<pre>
4141
\Assets\Images\contrast-standard\theme-dark
4242
\scale-100\logo.png
@@ -48,7 +48,7 @@ Next is an example of how you can provide variants of an image resource&mdash;na
4848
\scale-100\logo.png
4949
\scale-200\logo.png
5050
</pre>
51-
</blockquote>
51+
5252

5353
## Reference an image or other asset from XAML markup and code
5454
The name&mdash;or identifier&mdash;of an image resource is its path and file name with any and all qualifiers removed. If you name folders and/or files as in any of the examples in the previous section, then you have a single image resource and its name (as an absolute path) is `/Assets/Images/logo.png`. Here’s how you use that name in XAML markup.
@@ -98,29 +98,29 @@ Also see [Tile and toast support for language, scale, and high contrast](/window
9898
## Qualify an image resource for targetsize
9999
You can use the `scale` and `targetsize` qualifiers on different variants of the same image resource; but you can't use them both on a single variant of a resource. Also, you need to define at least one variant without a `TargetSize` qualifier. That variant must either define a value for `scale`, or let it default to `scale-100`. So, these two variants of the `/Assets/Square44x44Logo.png` resource are valid.
100100

101-
<blockquote>
101+
102102
<pre>
103103
\Assets\Square44x44Logo.scale-200.png
104104
\Assets\Square44x44Logo.targetsize-24.png
105105
</pre>
106-
</blockquote>
106+
107107

108108
And these two variants are valid.
109109

110-
<blockquote>
110+
111111
<pre>
112112
\Assets\Square44x44Logo.png // defaults to scale-100
113113
\Assets\Square44x44Logo.targetsize-24.png
114114
</pre>
115-
</blockquote>
115+
116116

117117
But this variant is not valid.
118118

119-
<blockquote>
119+
120120
<pre>
121121
\Assets\Square44x44Logo.scale-200_targetsize-24.png
122122
</pre>
123-
</blockquote>
123+
124124

125125
## Refer to an image file from your app package manifest
126126
If you name folders and/or files as in either of the two valid examples in the previous section, then you have a single app icon image resource and its name (as a relative path) is `Assets\Square44x44Logo.png`. In your app package manifest, simply refer to the resource by name. There's no need to use any URI scheme.

uwp/app-resources/makepri-exe-format-specific-indexers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,14 @@ The ResFiles indexer is identified by a `type` attribute of RESFILES. It indexes
278278

279279
A `.resfiles` file is a text file containing a flat list of file paths. A `.resfiles` file can contain "//" comments. Here's an example.
280280

281-
<blockquote>
281+
282282
<pre>
283283
Strings\component1\fr\elements.resjson
284284
Images\logo.scale-100.png
285285
Images\logo.scale-140.png
286286
Images\logo.scale-180.png
287287
</pre>
288-
</blockquote>
288+
289289

290290
## ResJSON
291291

uwp/app-resources/uri-schemes.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,8 @@ ms-appx:///images/logo.png
9292

9393
The URI above may actually retrieve a file within the current app's package with the following physical file name.
9494

95-
<blockquote>
9695
<pre>
9796
\Images\fr-FR\logo.scale-100_contrast-white.png
98-
</blockquote>
9997
</pre>
10098

10199
You could of course also retrieve that same physical file by referring to it directly by its full name.

uwp/app-resources/using-mrt-for-converted-desktop-apps-and-games.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ would not map well to MRT. A better structure would be a `Resources` directory w
523523
For example, the application might have a set of custom UI commands (used for button labels etc.) in a simple text file named <span>ui.txt</span>,
524524
laid out under a <span>UICommands</span> folder:
525525

526-
<blockquote>
526+
527527
<pre>
528528
+ ProjectRoot
529529
|--+ Strings
@@ -539,22 +539,22 @@ laid out under a <span>UICommands</span> folder:
539539
|--- AppxManifest.xml
540540
|--- ...rest of project...
541541
</pre>
542-
</blockquote>
542+
543543

544544
#### Resource loading code
545545

546546
This article assumes that at some point in your code you want to locate the file that contains a localized resource, load it, and then use it. The APIs used to load the resources,
547547
the APIs used to extract the resources, etc. are not important. In pseudocode, there are basically three steps:
548548

549-
<blockquote>
549+
550550
<pre>
551551
set userLanguage = GetUsersPreferredLanguage()
552552
set resourceFile = FindResourceFileForLanguage(MY_RESOURCE_NAME, userLanguage)
553553
set resource = LoadResource(resourceFile)
554554

555555
// now use 'resource' however you want
556556
</pre>
557-
</blockquote>
557+
558558

559559
MRT only requires changing the first two steps in this process - how you determine the best candidate resources and how you locate them. It doesn't require you to change how you load
560560
or use the resources (although it provides facilities for doing that if you want to take advantage of them).
@@ -578,7 +578,7 @@ this example, the file-based resources vs. the string resources)
578578

579579
In pseudo-code, the way you would resolve a given resource file name (like `UICommands\ui.txt` in the sample above) is as follows:
580580

581-
<blockquote>
581+
582582
<pre>
583583
// Get the ResourceContext that applies to this app
584584
set resourceContext = ResourceContext.GetForViewIndependentUse()
@@ -598,7 +598,7 @@ set bestCandidate = desiredResource.Resolve(resourceContext)
598598

599599
// Get the string value (the filename) from the ResourceCandidate
600600
set absoluteFileName = bestCandidate.ValueAsString
601-
</blockquote>
601+
602602
</pre>
603603

604604
Note in particular that the code does **not** request a specific language folder - like `UICommands\en-US\ui.txt` - even though that is how the files exist on-disk. Instead, it
@@ -618,7 +618,7 @@ user doesn't have the language listed in their preferences).
618618

619619
For example, imagine a .NET application with the following layout, where all the files exist under the `MainApp` folder:
620620

621-
<blockquote>
621+
622622
<pre>
623623
+ MainApp
624624
|--+ en-us
@@ -629,11 +629,11 @@ For example, imagine a .NET application with the following layout, where all the
629629
| \--- MainApp.resources.dll
630630
\--- MainApp.exe
631631
</pre>
632-
</blockquote>
632+
633633

634634
After conversion to .appx, the layout will look something like this, assuming `en-US` was the default language and the user has both German and French listed in their language list:
635635

636-
<blockquote>
636+
637637
<pre>
638638
+ WindowsAppsRoot
639639
|--+ MainApp_neutral
@@ -647,7 +647,7 @@ After conversion to .appx, the layout will look something like this, assuming `e
647647
\--+ fr-fr
648648
\--- <span>MainApp.resources.dll</span>
649649
</pre>
650-
</blockquote>
650+
651651

652652
Because the localized resources no longer exist in sub-directories underneath the main executable's install location, the built-in .NET resource resolution fails. Luckily, .NET has
653653
a well-defined mechanism for handling failed assembly load attempts - the `AssemblyResolve` event. A .NET app using MRT must register for this event and provide the missing assembly

0 commit comments

Comments
 (0)