使用されていません。PenInputPanel オブジェクト内で現在入力に使用されているパネルの種類を取得または設定します。PenInputPanel は Microsoft.Ink.TextInput に置き換えられました。
名前空間 : Microsoft.Ink
アセンブリ : Microsoft.Ink (Microsoft.Ink.dll 内)
構文
'宣言
Public Property CurrentPanel As PanelType
'使用
Dim instance As PenInputPanel
Dim value As PanelType
value = instance.CurrentPanel
instance.CurrentPanel = value
public PanelType CurrentPanel { get; set; }
public:
property PanelType CurrentPanel {
PanelType get ();
void set (PanelType value);
}
/** @property */
public PanelType get_CurrentPanel()
/** @property */
public void set_CurrentPanel(PanelType value)
public function get CurrentPanel () : PanelType
public function set CurrentPanel (value : PanelType)
プロパティ値
型 : Microsoft.Ink.PanelType
PenInputPanel オブジェクト内で現在入力に使用されているパネルの種類を表す PanelType 値の 1 つ。パネルの種類 Handwriting が既定値です。
解説
![]() |
---|
PenInputPanel オブジェクトを作成すると、Handwriting パネル (手書きパッドとも呼ばれる) が既定の入力 UI になります。
PenInputPanel オブジェクトが初めてアクティブになる前に、CurrentPanel プロパティを設定することによりパネルを変更した場合、PanelChanged イベントが発生します。
CurrentPanel プロパティは、PanelType 列挙体の Handwriting 値または Keyboard 値のいずれかにのみ設定できます。CurrentPanel プロパティを Default または Inactive に設定することはできません。
パネル ウィンドウが PenInputPanel オブジェクトの別のインスタンスに関連付けられている場合、CurrentPanel プロパティは Inactive 列挙値を返します。パネルがアクティブでないか、パネルの種類が無効な場合、CurrentPanel プロパティを設定すると例外が発生します。
![]() |
---|
部分信頼で使用している場合、このプロパティには PenInputPanel により必要とされるアクセス許可に加えて、SecurityPermissionFlag.AllFlags アクセス許可が必要です。詳細については、「Security and Trust」を参照してください。 |
例
この C# の例では、PenInputPanel オブジェクト thePenInputPanel を作成し、それを InkEdit コントロール theInkEdit に結合します。VisibleChanged イベント ハンドラ VisibleChanged_Event を thePenInputPanel に結合します。このイベント ハンドラは、CurrentPanel プロパティをキーボードに設定することにより、ペン入力パネルが表示されるときは必ずペン入力パネルにキーボード パネルを表示します。
[C#]
//...
// Declare the PenInputPanel object
PenInputPanel thePenInputPanel;
public Form1()
{
// Required for Windows Form Designer support
InitializeComponent();
// Create and attach the new PenInputPanel to an InkEdit control.
thePenInputPanel = new PenInputPanel(theInkEdit);
// Add a VisibleChanged event handler
thePenInputPanel.VisibleChanged +=
new PenInputPanelVisibleChangedEventHandler(VisibleChanged_Event);
}
//...
public void VisibleChanged_Event(object sender,
PenInputPanelVisibleChangedEventArgs e)
{
// Make sure the object that generated
// the event is a PenInputPanel object
if (sender is PenInputPanel)
{
PenInputPanel theSenderPanel = (PenInputPanel)sender;
// If the panel has become visible...
if (e.NewVisibility)
{
// Always default to keyboard input
if (theSenderPanel.CurrentPanel == PanelType.Handwriting)
{
theSenderPanel.CurrentPanel = PanelType.Keyboard;
}
}
}
}
この Microsoft® Visual Basic® .NET の例では、PenInputPanel オブジェクト thePenInputPanel を作成し、それを InkEdit コントロール theInkEdit に結合します。VisibleChanged イベント ハンドラ VisibleChanged_Event を thePenInputPanel に結合します。このイベント ハンドラは、CurrentPanel プロパティをキーボードに設定することにより、ペン入力パネルが表示されるときは必ずペン入力パネルにキーボード パネルを強制的に表示します。
[Visual Basic]
'...
' Declare the PenInputPanel object
Dim thePenInputPanel As PenInputPanel
Public Sub New()
MyBase.New()
' Required for Windows Form Designer support
InitializeComponent()
' Create and attach the new PenInputPanel to an InkEdit control.
thePenInputPanel = New PenInputPanel(theInkEdit)
' Add a VisibleChanged event handler
AddHandler thePenInputPanel.VisibleChanged, _
AddressOf VisibleChanged_Event
End Sub 'New
'...
Public Sub VisibleChanged_Event(sender As Object, e As _
PenInputPanelVisibleChangedEventArgs)
' Make sure the object that generated
' the event is a PenInputPanel object
If TypeOf sender Is PenInputPanel Then
Dim theSenderPanel As PenInputPanel = CType(sender, PenInputPanel)
' If the panel has become visible...
If e.NewVisibility Then
' Always default to keyboard input
If theSenderPanel.CurrentPanel = PanelType.Handwriting Then
theSenderPanel.CurrentPanel = PanelType.Keyboard
End If
End If
End If
End Sub 'VisibleChanged_Event
プラットフォーム
Windows Vista
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0