Update README.md for C++/WinRT (#662)

C++/WinRT is a recommended replacement for C++/CX, and can get use of Win2D without difficulty.
This commit is contained in:
Berrysoft 2018-12-29 06:54:48 +08:00 коммит произвёл Shawn Hargreaves
Родитель 255bc6ca9f
Коммит 61159ccfa0
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -45,6 +45,14 @@ void MainPage::CanvasControl_Draw(CanvasControl^ sender, CanvasDrawEventArgs^ ar
args->DrawingSession->DrawText("Hello, world!", 100, 100, Colors::Yellow);
}
```
or C++/WinRT:
```cpp
void MainPage::CanvasControl_Draw(CanvasControl const& sender, CanvasDrawEventArgs const& args)
{
args.DrawingSession().DrawEllipse(155, 115, 80, 30, Colors::Black(), 3);
args.DrawingSession().DrawText(L"Hello, world!", 100, 100, Colors::Yellow());
}
```
or VB:
```vb
Sub canvasControl_Draw(sender As CanvasControl, args As CanvasDrawEventArgs)