使用されていません。Tablet PC 入力パネルに基づいて PenInputPanel プロパティを更新および復元し、ペン入力パネルを自動的に配置して、そのユーザー インターフェイスを既定のパネルに設定します。。PenInputPanel は Microsoft.Ink.TextInput に置き換えられました。
名前空間 : Microsoft.Ink
アセンブリ : Microsoft.Ink (Microsoft.Ink.dll 内)
構文
'宣言
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
<UIPermissionAttribute(SecurityAction.Demand, Window := UIPermissionWindow.SafeTopLevelWindows)> _
<SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted := True)> _
Public Sub Refresh
'使用
Dim instance As PenInputPanel
instance.Refresh()
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
[UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.SafeTopLevelWindows)]
[SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true)]
public void Refresh()
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
[UIPermissionAttribute(SecurityAction::Demand, Window = UIPermissionWindow::SafeTopLevelWindows)]
[SecurityPermissionAttribute(SecurityAction::Demand, Unrestricted = true)]
public:
void Refresh()
/** @attribute PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust") */
/** @attribute UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.SafeTopLevelWindows) */
/** @attribute SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true) */
public void Refresh()
public function Refresh()
解説
Refresh メソッドは、既定のパネルを復元します。たとえば、DefaultPanel プロパティがキーボードに設定されており、CurrentPanel プロパティが手書きに設定されている場合、Refresh メソッドはペン入力パネルをキーボードに設定します。DefaultPanel プロパティが既定値に設定されている場合、Refresh メソッドはペン入力パネルを変更しません。
Refresh メソッドは、ペン入力パネルを結合先のコントロールと相対的な位置に自動配置します。
Refresh メソッドは、Tablet PC 入力パネル設定を使用することによりペン入力パネルを更新します。たとえば、PenInputPanel オブジェクトに変更を加え、Refresh を呼び出して設定を入力パネルからコピーされた設定に復元できます。
入力パネルで設定が変更されると、必ず PenInputPanel オブジェクトが自動的に更新されます。
ペン入力パネルにフォーカスがないときに Refresh メソッドを呼び出すと、エラーが生成されます。
![]() |
---|
通常、機能はペン入力パネルのアクティブ化時に表されるため、Refresh を呼び出す必要はありません。ただし、AutoShow プロパティが false に設定されている場合、ペン入力パネルのアクティブ化を無効にできます。その場合は、Refresh メソッドを使用して PenInputPanel オブジェクトを更新します。 |
![]() |
---|
Microsoft® Windows® XP Tablet PC Edition 2005 を使用する場合、Refresh メソッドは使用されず、何も実行しません。 |
![]() |
---|
部分信頼で使用している場合、このメソッドには PenInputPanel により必要とされるアクセス許可に加えて、SecurityPermissionFlag.AllFlags アクセス許可が必要です。詳細については、「Security and Trust」を参照してください。 |
例
この C# の例では、PenInputPanel オブジェクト thePenInputPanel を InkEdit コントロール theInkEdit に結合します。また、VisibleChanged イベント ハンドラ VisibleChanged_Event を PenInputPanel のフォームに追加します。イベント ハンドラでは、PenInputPanel オブジェクトが表示された場合、Refresh メソッドを呼び出すことによりその設定が入力パネルの設定に復元されます。
[C#]
//...
// Delcare 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 PenInputPanelVisibleChanged 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)
{
// Restore the pen input panel settings
// from the global Input Panel
theSenderPanel.Refresh();
}
}
}
この Microsoft Visual Basic .NET の例では、PenInputPanel オブジェクト thePenInputPanel を InkEdit コントロール theInkEdit に結合します。また、VisibleChanged イベント ハンドラ VisibleChanged_Event を PenInputPanel のフォームに追加します。イベント ハンドラでは、PenInputPanel オブジェクトが表示された場合、Refresh メソッドを呼び出すことによりその設定が入力パネルの設定に復元されます。
[Visual Basic]
'...
' Declare the PenInputPanel object
Dim thePenInputPanel As PenInputPanel
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
' Create and attach the new PenInputPanel to an InkEdit control.
thePenInputPanel = New PenInputPanel(theInkEdit)
' Add a PenInputPanelVisibleChanged 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
' Restore the pen input panel settings
' from the global Input Panel
theSenderPanel.Refresh()
End If
End If
End Sub 'VisibleChanged_Event
プラットフォーム
Windows Vista
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0