Language
編集

InkCanvas Class

Definition

public class InkCanvas : Microsoft.Toolkit.Forms.UI.XamlHost.WindowsXamlHostBase
type InkCanvas = class
    inherit WindowsXamlHostBase
Public Class InkCanvas
Inherits WindowsXamlHostBase
Inheritance

Constructors

Name Description
InkCanvas()
InkCanvas(String)

Properties

Name Description
ChildInternal

Gets or sets XAML content for XamlContentHost

(Inherited from WindowsXamlHostBase)
DefaultSize

Gets the default size of the control.

(Inherited from WindowsXamlHostBase)
DpiScalingRenderTransform

Gets or sets a value indicating whether a render transform is added to the UWP control corresponding to the current dpi scaling factor if scaling is not supported natively by the XAML island

(Inherited from WindowsXamlHostBase)
Focused

Gets a value indicating whether this Control currently has focus. Check both the Control's window handle and the hosted Xaml window handle. If either has focus then this Control currently has focus.

(Inherited from WindowsXamlHostBase)
InkPresenter

Gets Windows.UI.Xaml.Controls.InkCanvas.InkPresenter

Methods

Name Description
Dispose(Boolean)

Clean up hosted UWP XAML content

(Inherited from WindowsXamlHostBase)
GetPreferredSize(Size)

Overrides the base class implementation of GetPreferredSize(Size) to provide correct layout behavior for the hosted XAML content.

(Inherited from WindowsXamlHostBase)
GetUwpInternalObject()

Exposes ChildInternal without exposing its actual Type.

(Inherited from WindowsXamlHostBase)
OnChildSizeChanged(Object, Object)

Responds to UWP XAML's 'SizeChanged' event, fired when XAML content layout has changed. If 'DesiredSize' has changed, re-run Windows Forms layout.

(Inherited from WindowsXamlHostBase)
OnHandleCreated(EventArgs)

Raises the HandleCreated event. Assign window render target to UWP XAML content.

(Inherited from WindowsXamlHostBase)
OnHandleDestroyed(EventArgs)

Override that disposes the current instance when the parent handle has been destroyed

(Inherited from WindowsXamlHostBase)
OnPaint(PaintEventArgs)

Draw a placeholder Rectangle with 'Xaml Content' in Design mode

(Inherited from WindowsXamlHostBase)
OnPaintBackground(PaintEventArgs)

Prevent control from painting the background

(Inherited from WindowsXamlHostBase)
OnWindowXamlHostSizeChanged(Object, EventArgs)

Event handler for SizeChanged. If the size of the host control has changed, re-run Windows Forms layout on this Control instance.

(Inherited from WindowsXamlHostBase)
PreProcessMessage(Message)

In order to handle keyboard accelerators and TAB input, we must give a chance to <seealso cref="T:Windows.UI.Xaml.Hosting.DesktopWindowXamlSource"></seealso> to handle the msg using <seealso cref="M:Microsoft.Toolkit.Win32.UI.XamlHost.IDesktopWindowXamlSourceNative2.PreTranslateMessage(System.Windows.Forms.Message@)"></seealso>

(Inherited from WindowsXamlHostBase)
ProcessTabKey(Boolean)

Processes a tab key, ensuring that Xaml has an opportunity to handle the command before normal Windows Forms processing. (Xaml must be notified of keys that invoke focus navigation.)

(Inherited from WindowsXamlHostBase)
Select(Boolean, Boolean)

Activates the Windows Forms WindowsXamlHost Control

(Inherited from WindowsXamlHostBase)
SetContent(UIElement)

Sets the root UWP XAML element on DesktopWindowXamlSource

(Inherited from WindowsXamlHostBase)
UpdateDpiScalingFactor()

Sets a scaling factor based on the current dpi value on the scaling panel

(Inherited from WindowsXamlHostBase)
WndProc(Message)

Processes Windows messages for XamlContentHost control window (not XAML window)

(Inherited from WindowsXamlHostBase)

Events

Name Description
ChildChanged

Fired when XAML content has been updated

(Inherited from WindowsXamlHostBase)

Applies to