Universal Windows Platform introduced a InkCanvas (Easy drawing and inking using new InkCanvas Control for Universal Windows App) control to easy drawing and a new Inking API to manage the inking. Binding an InkToolbar to the InkCanvas control will now enhance the capability of this control all together. You can now have several options for drawing, erasing and highlighting etc. By default, the InkToolbar provides UI control for selecting ink, stroke size, ink color, pen tip as well as options for erasing.
In the App you need to just define the InkCanvas and the InkToolbar and InCanvas controls. The InkCanvas provides the canvas area for drawing using inputs, and the InkToolbar provides the enhanced controls.
<InkCanvas x:Name="inkCanvas" /> <InkToolbar x:Name="inkToolbar" HorizontalAlignment="Center" VerticalAlignment="Top" TargetInkCanvas="{x:Bind inkCanvas}" />
You have to define the input device type for your inCanvas control to let the control accepts inputs from those devices.
inkCanvas.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.Mouse | Windows.UI.Core.CoreInputDeviceTypes.Pen;
Then simply run it.
The InkToolbar Control is fairly simple to use , just link another painting app toolbar.
The addition of this control will definitely help developer to provide rich drawing / painting capabilities with no time / efforts.
Hope this helps !
Pingback: Dew Drop - August 17, 2016 (#2311) - Morning Dew
Pingback: Customizing the InkToolbar in Universal Windows App