ToolTip.CustomPopupPlacementCallback 속성

정의

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

속성 값

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 없음

적용 대상

추가 정보