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)
Syntax
'Declaration
Public Property DefaultPanel As PanelType
'Usage
Dim instance As PenInputPanel
Dim value As PanelType
value = instance.DefaultPanel
instance.DefaultPanel = value
public PanelType DefaultPanel { get; set; }
public:
property PanelType DefaultPanel {
PanelType get ();
void set (PanelType value);
}
/** @property */
public PanelType get_DefaultPanel ()
/** @property */
public void set_DefaultPanel (PanelType value)
public function get DefaultPanel () : PanelType
public function set DefaultPanel (value : PanelType)
Not applicable.
Property Value
One of the PanelType values.
Remarks
Note
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 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. |
Example
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
Platforms
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
PenInputPanel Class
PenInputPanel Members
Microsoft.Ink Namespace
PenInputPanel.CurrentPanel
PanelType