Export (0) Print
Expand All

PenInputPanel.DefaultPanel Property

Deprecated. Gets or sets the default panel type used for input within the PenInputPanel object. PenInputPanel has been replaced by Microsoft.Ink.TextInput.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

public PanelType DefaultPanel { get; set; }

Property Value

Type: Microsoft.Ink.PanelType
One of the PanelType values.

NoteNote:

The DefaultPanel property cannot be set to Inactive.

The Handwriting panel—also known as the writing pad—is the default input UI for a PenInputPanel object.

If the value of this property is Default, then the PenInputPanel object uses the last panel type used for any pen input panel in any application. If all previous references to the pen input panel have been destroyed in all active applications, a new PenInputPanel object uses the Handwriting panel type.

If the panel is changed by setting the CurrentPanel property before the PenInputPanel object becomes active for the first time, a PanelChanged event occurs.

Setting the DefaultPanel property enables you to specify which type of panel shows by default in that instance of the PenInputPanel object. If the value of this property is Handwriting or Keyboard, then each time the panel is made visible, it uses the handwriting or keyboard panel type, respectively.

If you re-attach the PenInputPanel to a different control and change the DefaultPanel property when the focus changes to the new control, be sure to set the DefaultPanel property before setting the AttachedEditWindow property to ensure that the correct panel is displayed.

Security noteSecurity Note:

If using under partial trust, this property requires SecurityPermissionFlag.AllFlags permission, in addition to the permissions required by PenInputPanel. See Security and Trust for more information.

This C# example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, theInkEdit. It then sets the keyboard to be the default input method for the pen input panel by setting the DefaultPanel property to Keyboard.

[C#]

//...

// Declare, create, and attach a new PenInputPanel to an InkEdit control
PenInputPanel thePenInputPanel = new PenInputPanel(theInkEdit);

// Set the default panel to keyboard input
thePenInputPanel.DefaultPanel = PanelType.Keyboard;

This Microsoft® Visual Basic® .NET example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, theInkEdit. It then sets the keyboard to be the default input method for the pen input panel by setting the DefaultPanel property to KeyBoard.

[Visual Basic]

' Declare, create, and attach a new PenInputPanel to an InkEdit control
Dim thePenInputPanel As New PenInputPanel(theInkEdit)

' Set the default panel to keyboard input
thePenInputPanel.DefaultPanel = PanelType.Keyboard

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft