Popup.CustomPopupPlacementCallback Popup.CustomPopupPlacementCallback Popup.CustomPopupPlacementCallback Popup.CustomPopupPlacementCallback Property

定義

Popup コントロールを配置する代理ハンドラーのメソッドを取得または設定します。Gets or sets a delegate handler method that positions the Popup control.

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; }
member this.CustomPopupPlacementCallback : System.Windows.Controls.Primitives.CustomPopupPlacementCallback with get, set
Public Property CustomPopupPlacementCallback As CustomPopupPlacementCallback

プロパティ値

Popup コントロールの配置情報を提供する CustomPopupPlacementCallback デリゲート メソッド。The CustomPopupPlacementCallback delegate method that provides placement information for the Popup control. 既定値は、null です。The default is null.

次の例は、設定する方法を示します、CustomPopupPlacementCallbackを委任します。The following example shows how to set a CustomPopupPlacementCallback delegate.

popup1.CustomPopupPlacementCallback =
    new CustomPopupPlacementCallback(placePopup);
popup1.CustomPopupPlacementCallback = New CustomPopupPlacementCallback(AddressOf placePopup)
public CustomPopupPlacement[] placePopup(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 placePopup(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

注釈

依存プロパティ情報Dependency Property Information

識別子フィールドです。Identifier field CustomPopupPlacementCallbackProperty
メタデータのプロパティを設定するには trueMetadata properties set to true なしNone

適用対象

こちらもご覧ください