Skip to content

Commit 430364e

Browse files
committed
Fixing broken links to the different toast templates examples
Source: https://github.com/MicrosoftDocs/winrt-api
1 parent 09227c7 commit 430364e

File tree

10 files changed

+28
-26
lines changed

10 files changed

+28
-26
lines changed

README.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ WinToast is a lightly library written in C++ which brings a complete integration
1818

1919
Toast notifications allows your app to inform the users about relevant information and timely events that they should see and take action upon inside your app, such as a new instant message, a new friend request, breaking news, or a calendar event.
2020

21-
1. [Toast Templates](#id1)
22-
2. [Event Handler](#id3)
23-
3. [Expiration Time](#id4)
24-
4. [Additional features available on Windows 10](#id5)
25-
5. [Error Handling](#id2)
26-
6. [Example of usage](#id6)
27-
7. [Toast configuration on Windows 10](#id7)
28-
8. [Projects using WinToast](#id8)
21+
- [WinToast](#wintoast)
22+
- [Toast Templates](#toast-templates)
23+
- [Event Handler](#event-handler)
24+
- [Expiration Time](#expiration-time)
25+
- [Additional features available on Windows 10](#additional-features-available-on-windows-10)
26+
- [Error Handling](#error-handling)
27+
- [Example of Usage](#example-of-usage)
28+
- [Installation](#installation)
29+
- [Toast configuration on Windows 10](#toast-configuration-on-windows-10)
30+
- [Projects using WinToast](#projects-using-wintoast)
2931

3032

3133
<div id='id1' />
@@ -36,14 +38,14 @@ WinToast integrates all standard templates available in the [ToastTemplateType e
3638

3739
| Template | Description | Example |
3840
| :------- | ----: | :---: |
39-
| `ImageAndText01` | A large image and a single string wrapped across three lines of text. | ![enter image description here](https://i-msdn.sec.s-msft.com/dynimg/IC601606.png) |
40-
| `ImageAndText02` | A large image, one string of bold text on the first line, one string of regular text wrapped across the second and third lines. | ![12](https://i-msdn.sec.s-msft.com/dynimg/IC601607.png) |
41-
| `ImageAndText03` | A large image, one string of bold text wrapped across the first two lines, one string of regular text on the third line. | ![enter image description here](https://i-msdn.sec.s-msft.com/dynimg/IC601608.png) |
42-
| `ImageAndText04` | A large image, one string of bold text on the first line, one string of regular text on the second line, one string of regular text on the third line. | ![enter image description here](https://i-msdn.sec.s-msft.com/dynimg/IC601609.png) |
43-
| `Text01` | Single string wrapped across three lines of text. | ![enter image description here](https://i-msdn.sec.s-msft.com/dynimg/IC601602.png)|
44-
| `Text02` | One string of bold text on the first line, one string of regular text wrapped across the second and third lines. | ![enter image description here](https://i-msdn.sec.s-msft.com/dynimg/IC601603.png) |
45-
| `Text03` | One string of bold text wrapped across the first two lines, one string of regular text on the third line. | ![enter image description here](https://i-msdn.sec.s-msft.com/dynimg/IC601604.png)|
46-
| `Text04` | One string of bold text on the first line, one string of regular text on the second line, one string of regular text on the third line. | ![enter image description here](https://i-msdn.sec.s-msft.com/dynimg/IC601605.png) |
41+
| `ImageAndText01` | A large image and a single string wrapped across three lines of text. | ![enter image description here](assets/images/Toast_6.png) |
42+
| `ImageAndText02` | A large image, one string of bold text on the first line, one string of regular text wrapped across the second and third lines. | ![12](assets/images/Toast_7.png) |
43+
| `ImageAndText03` | A large image, one string of bold text wrapped across the first two lines, one string of regular text on the third line. | ![enter image description here](assets/images/Toast_8.png) |
44+
| `ImageAndText04` | A large image, one string of bold text on the first line, one string of regular text on the second line, one string of regular text on the third line. | ![enter image description here](assets/images/ToastImageAndText04.png) |
45+
| `Text01` | Single string wrapped across three lines of text. | ![enter image description here](assets/images/Toast_1.png)|
46+
| `Text02` | One string of bold text on the first line, one string of regular text wrapped across the second and third lines. | ![enter image description here](assets/images/Toast_2.png) |
47+
| `Text03` | One string of bold text wrapped across the first two lines, one string of regular text on the third line. | ![enter image description here](assets/images/Toast_4.png)|
48+
| `Text04` | One string of bold text on the first line, one string of regular text on the second line, one string of regular text on the third line. | ![enter image description here](assets/images/Toast_5.png) |
4749

4850
Example of a `ImageAndText02` template:
4951

@@ -52,9 +54,9 @@ WinToastTemplate templ = WinToastTemplate(WinToastTemplate::ImageAndText02);
5254
templ.setTextField(L"title", WinToastTemplate::FirstLine);
5355
templ.setTextField(L"subtitle", WinToastTemplate::SecondLine);
5456
templ.setImagePath(L"C:/example.png");
55-
```
57+
```
5658
**Note:** The user can use the default system sound or specify a sound to play when a toast notification is displayed. Same behavior for the toast notification image, by default Windows try to use the app icon.*
57-
59+
5860
<div id='id3' />
5961

6062
## Event Handler
@@ -79,13 +81,13 @@ class WinToastHandlerExample : public IWinToastHandler {
7981
void toastDismissed(WinToastDismissalReason state) const override;
8082
void toastFailed() const override;
8183
};
82-
```
84+
```
8385
<div id='id4' />
8486
8587
## Expiration Time
8688
8789
Set the time after which a toast notification is no longer considered current or valid and should not be displayed. Windows attempts to raise toast notifications immediately after you call Show, so this property is rarely used.
88-
90+
8991
> For Windows 8.x app, this property also causes the toast notification to be removed from the
9092
> Action Center once the specified data and time is reached.
9193
@@ -111,7 +113,7 @@ actions.push_back(L"No");
111113
for (auto const &action : actions)
112114
templ.addAction(action);
113115
WinToast::instance()->showToast(templ, handler)
114-
```
116+
```
115117

116118
!["Toast with some actions"](https://lh3.googleusercontent.com/uJE_H0aBisOZ-9GynEWgA7Hha8tHEI-i0aHrFuOFDBsPSD-IJ-qEN0Y7XY4VI5hp_5MQ9xjWbFcm)
117119
- **Attribution text**: you can add/remove the attribution text, by default is empty. Use `WinToastTemplate::setAttributionText` to modify it.
@@ -163,7 +165,7 @@ if (!launched) {
163165
std::wcout << L"Error: Could not launch your toast notification. Error: "
164166
<< error << std::endl;
165167
}
166-
```
168+
```
167169
168170
<div id='id6' />
169171
@@ -188,7 +190,7 @@ if (!WinToast::isCompatible()) {
188190
WinToast::instance()->setAppName(L"WinToastExample");
189191
const auto aumi = WinToast::configureAUMI(L"mohabouje", L"wintoast", L"wintoastexample", L"20161006");
190192
WinToast::instance()->setAppUserModelId(aumi);
191-
```
193+
```
192194
193195
Initialize all the dependencies and check if WinToast has been initialized successfully in your system:
194196
@@ -197,7 +199,7 @@ if (!WinToast::instance()->initialize()) {
197199
std::wcout << L"Error, could not initialize the lib!" << std::endl;
198200
}
199201
```
200-
202+
201203
Implement your own action handler by subclassing the interface `IWinToastHandler` and custom your template:
202204

203205
```cpp
@@ -206,7 +208,7 @@ WinToastTemplate templ = WinToastTemplate(WinToastTemplate::ImageAndText02);
206208
templ.setImagePath(L"C:/example.png");
207209
templ.setTextField(L"title", WinToastTemplate::FirstLine);
208210
templ.setTextField(L"subtitle", WinToastTemplate::SecondLine);
209-
```
211+
```
210212

211213
Finally show the results:
212214

@@ -215,7 +217,7 @@ Finally show the results:
215217
if (!WinToast::instance()->showToast(templ, handler)) {
216218
std::wcout << L"Error: Could not launch your toast notification!" << std::endl;
217219
}
218-
```
220+
```
219221
<div id='id7' />
220222
221223
## Installation
21.5 KB
Loading

assets/images/ToastText02Phone.png

4.75 KB
Loading

assets/images/Toast_1.png

5.25 KB
Loading

assets/images/Toast_2.png

5.23 KB
Loading

assets/images/Toast_4.png

5.26 KB
Loading

assets/images/Toast_5.png

4.67 KB
Loading

assets/images/Toast_6.png

22.6 KB
Loading

assets/images/Toast_7.png

22.6 KB
Loading

assets/images/Toast_8.png

22.3 KB
Loading

0 commit comments

Comments
 (0)