ToolTip.CustomPopupPlacementCallback プロパティ
この記事の内容
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ToolTip の配置に使用するデリゲート ハンドラー メソッドを取得または設定します。
public:
property System::Windows::Controls::Primitives::CustomPopupPlacementCallback ^ CustomPopupPlacementCallback { System::Windows::Controls::Primitives::CustomPopupPlacementCallback ^ get(); void set(System::Windows::Controls::Primitives::CustomPopupPlacementCallback ^ value); };
[System.ComponentModel.Bindable(false)]
public System.Windows.Controls.Primitives.CustomPopupPlacementCallback CustomPopupPlacementCallback { get; set; }
[<System.ComponentModel.Bindable(false)>]
member this.CustomPopupPlacementCallback : System.Windows.Controls.Primitives.CustomPopupPlacementCallback with get, set
Public Property CustomPopupPlacementCallback As CustomPopupPlacementCallback
ToolTip の配置情報を提供する CustomPopupPlacementCallback デリゲート メソッド。 既定値は、null
です。
- 属性
次の例では、 プロパティを設定し、 CustomPopupPlacementCallback 対応するデリゲートを作成する方法を示します。 と同じ手法が に Popup使用されます。これは 、ポップアップ配置のサンプルで示されています。
aToolTip.Placement = PlacementMode.Custom;
aToolTip.CustomPopupPlacementCallback =
new CustomPopupPlacementCallback(placeToolTip);
aToolTip.Placement = PlacementMode.Custom
aToolTip.CustomPopupPlacementCallback = New CustomPopupPlacementCallback(AddressOf placeToolTip)
public CustomPopupPlacement[] placeToolTip(Size popupSize,
Size targetSize,
Point offset)
{
CustomPopupPlacement placement1 =
new CustomPopupPlacement(new Point(-50, 100), PopupPrimaryAxis.Vertical);
CustomPopupPlacement placement2 =
new CustomPopupPlacement(new Point(10, 20), PopupPrimaryAxis.Horizontal);
CustomPopupPlacement[] ttplaces =
new CustomPopupPlacement[] { placement1, placement2 };
return ttplaces;
}
Public Function placeToolTip(ByVal popupSize As Size, ByVal targetSize As Size, ByVal offset As Point) As CustomPopupPlacement()
Dim placement1 As New CustomPopupPlacement(New Point(-50, 100), PopupPrimaryAxis.Vertical)
Dim placement2 As New CustomPopupPlacement(New Point(10, 20), PopupPrimaryAxis.Horizontal)
Dim ttplaces() As CustomPopupPlacement = { placement1, placement2 }
Return ttplaces
End Function
コールバック デリゲートを Placement 使用するには、 プロパティを に Custom 設定する必要があります。
デリゲートは CustomPopupPlacementCallback 、 に関して定義されている可能なポイントの配列を PlacementTarget返します。 が ToolTip 表示されると、表示されるウィンドウの ToolTip 量を最大化するポイントが選択されます。
識別子フィールド | CustomPopupPlacementCallbackProperty |
に設定されたメタデータ プロパティ true |
なし |
製品 | バージョン |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET に関するフィードバック
.NET はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。