DynamicRenderer オブジェクトが、現在データ ストアにあるインク データを再描画します。
名前空間 : Microsoft.StylusInput
アセンブリ : Microsoft.Ink (Microsoft.Ink.dll 内)
構文
'宣言
Public Sub Refresh
'使用
Dim instance As DynamicRenderer
instance.Refresh()
public void Refresh()
public:
void Refresh()
public void Refresh()
public function Refresh()
解説
EnableDataCache プロパティが true の場合、DynamicRenderer オブジェクトは、まだキャッシュから解放されていないタブレット ペン データをすべて再描画します。EnableDataCache プロパティが false の場合、DynamicRenderer オブジェクトは現在のストロークだけを再描画します。
DynamicRenderer オブジェクトの Refresh メソッドを Paint イベント ハンドラ内から呼び出す場合、DynamicRenderer オブジェクトの ClipRectangle プロパティを PaintEventArgs オブジェクトの ClipRectangle プロパティに設定します。
DynamicRenderer オブジェクトが既に破棄されている場合は、このメソッドにより例外が発生します。
例
この C# の例では、Control の Paint イベント内で、DynamicRenderer オブジェクト theDynamicRenderer の Refresh メソッドを呼び出します。ウィンドウが無効になっている場合、DynamicRenderer はデータ キャッシュ内のすべてのタブレット ペン データを再描画します。この操作に対する EnableDataCache プロパティの影響については、このトピックの「解説」を参照してください。
private void InkCollection_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
// Refresh the dynamic renderer, since it's possible that a stroke is being
// collected at the time Paint occurs. In this case, the portion of the stroke
// that has already been collected will need to be redrawn.
theDynamicRenderer.ClipRectangle = e.ClipRectangle;
theDynamicRenderer.Refresh();
// ...
}
この Microsoft Visual Basic .NET の例では、Control の Paint イベント内で、DynamicRenderer オブジェクト theDynamicRenderer の Refresh メソッドを呼び出します。ウィンドウが無効になっている場合、DynamicRenderer はデータ キャッシュ内のすべてのタブレット ペン データを再描画します。この操作に対する EnableDataCache プロパティの影響については、このトピックの「解説」を参照してください。
Private Sub InkCollector_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) _
Handles MyBase.Paint
' Refresh the dynamic renderer, since it's possible that a stroke is being
' collected at the time Paint occurs. In this case, the portion of the stroke
' that has already been collected will need to be redrawn.
theDynamicRenderer.ClipRectangle = e.ClipRectangle
theDynamicRenderer.Refresh()
' ...
End Sub
プラットフォーム
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0
参照
参照
DynamicRenderer.EnableDataCache
DynamicRenderer.ReleaseCachedData