Leadtools.Controlsアセンブリ > Leadtools.Controls名前空間 > ImageViewerInteractiveModeクラス :HitTestStateプロパティ |
public virtual bool HitTestState {get; set;}
'Declaration
Public Overridable Property HitTestState As Boolean
HitTestStateは、ビューワで関心領域の上に機能する対話モードを作成するのに用いられることができます。
サンプルを実行します。それが赤い長方形にかかっているとき、カーソルは十字線に変更します。
ImageViewerサンプルからサンプル関数内のコードをすべて削除し("// TODO:ここにサンプルコードを追加します"というコメントを検索する)、以下のコードを挿入します。
Imports Leadtools Imports Leadtools.Controls Imports Leadtools.Codecs Imports Leadtools.Drawing Imports Leadtools.ImageProcessing Imports Leadtools.ImageProcessing.Color Dim interactiveModeCursor As Cursor = Nothing If Not _imageViewer.HitTestStateInteractiveMode Is Nothing Then interactiveModeCursor = _imageViewer.HitTestStateInteractiveMode.HitTestStateCursor End If If Not interactiveModeCursor Is Nothing Then _imageViewer.Cursor = interactiveModeCursor End If
using Leadtools; using Leadtools.Controls; using Leadtools.Codecs; using Leadtools.Drawing; using Leadtools.ImageProcessing; using Leadtools.ImageProcessing.Color; Cursor interactiveModeCursor = null; if (_imageViewer.HitTestStateInteractiveMode != null) { interactiveModeCursor = _imageViewer.HitTestStateInteractiveMode.HitTestStateCursor; } if (interactiveModeCursor != null) _imageViewer.Cursor = interactiveModeCursor;