* Suggestion/warning fixes for US-1889327. * Updated H2s. * Minor content edit. * Review edits. * Minor edits. * Update dotnet-desktop-guide/framework/wpf/advanced/localization-attributes-and-comments.md Co-authored-by: Andy (Steve) De George <[email protected]>
1.9 KiB
title, ms.date, ms.custom, description, dev_langs, helpviewer_keywords, ms.assetid
| title | ms.date | ms.custom | description | dev_langs | helpviewer_keywords | ms.assetid | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| How to: Rotate Ink | 03/30/2017 | devdivchpfy22 | Learn how to rotate Ink. |
|
|
fac36cc9-dd01-41ca-9bde-9d33e3790bbe |
How to: Rotate Ink
Example to rotate Ink
The following example copies the ink from an xref:System.Windows.Controls.InkCanvas to a xref:System.Windows.Controls.Canvas that contains an xref:System.Windows.Controls.InkPresenter. When the application copies the ink, it also rotates the ink 90 degrees clockwise.
[!code-xamlHowToRotateInk#1]
[!code-csharpHowToRotateInk#2]
Adorner for Strokes
The following example is a custom xref:System.Windows.Documents.Adorner that rotates the strokes on an xref:System.Windows.Controls.InkPresenter.
[!code-csharpAdornerForStrokes#1] [!code-vbAdornerForStrokes#1]
The following example is a [!INCLUDETLA#tla_xaml] file that defines an xref:System.Windows.Controls.InkPresenter and populates it with ink. The Window_Loaded event handler adds the custom adorner to the xref:System.Windows.Controls.InkPresenter.
[!code-xamlAdornerForStrokes#2]
[!code-csharpAdornerForStrokes#3] [!code-vbAdornerForStrokes#3]