Popup.Placement 속성

정의

Popup 컨트롤이 열리는 방향을 가져오거나 설정하고 Popup 컨트롤이 화면 경계와 겹칠 때의 동작을 지정합니다.

public:
 property System::Windows::Controls::Primitives::PlacementMode Placement { System::Windows::Controls::Primitives::PlacementMode get(); void set(System::Windows::Controls::Primitives::PlacementMode value); };
[System.ComponentModel.Bindable(true)]
public System.Windows.Controls.Primitives.PlacementMode Placement { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.Placement : System.Windows.Controls.Primitives.PlacementMode with get, set
Public Property Placement As PlacementMode

속성 값

PlacementMode

PlacementMode 컨트롤이 열리는 방향을 결정하고 해당 컨트롤이 화면 경계와 상호 작용하는 방식을 지정하는 Popup 열거형 값입니다. 기본값은 Bottom입니다.

특성

예제

다음 예제에서는 네 가지 Popup 이미지와 관련 된 컨트롤입니다. 각 Popup 배치 속성에 대 한 다른 값이 있습니다.

<Canvas Width="200" Height="150">
  <Image Name="image1"
         Canvas.Left="75" 
         Source="Water_lilies.jpg" Height="200" Width="200"/>
  <Popup IsOpen="True" PlacementTarget="{Binding ElementName=image1}"
         Placement="Bottom">
    <TextBlock FontSize="14" Background="LightGreen">Placement=Bottom</TextBlock>

  </Popup>
  <Popup IsOpen="True" PlacementTarget="{Binding ElementName=image1}"
         Placement="Top">
    <TextBlock FontSize="14" Background="LightGreen">Placement=Top</TextBlock>

  </Popup>
  <Popup IsOpen="True" PlacementTarget="{Binding ElementName=image1}"
         Placement="Left">
    <TextBlock FontSize="14" Background="LightGreen">Placement=Left</TextBlock>

  </Popup>
  <Popup IsOpen="True" PlacementTarget="{Binding ElementName=image1}"
         Placement="Right">
    <TextBlock FontSize="14" Background="LightGreen">Placement=Right</TextBlock>

  </Popup>
</Canvas>

설명

설정 하 여 팝업을 배치할 수는 PlacementTarget, PlacementRectangle, Placement, HorizontalOffset, 및 VerticalOffset 속성입니다. 자세한 내용은 Popup 배치 동작을 참조하세요.

경우는 MenuDropAlignment 속성은 true설정 PlacementLeft 또는 Right 위치를 반대로 PopupPopup 사용 하 여 PlacementLeft 의 왼쪽된 가장자리에 맞추는 가장자리를 마우스 오른쪽 단추로 PlacementTargetPopup 사용 하 여 Placement 로 설정 Right 의 오른쪽 가장자리의 왼쪽된 가장자리에 맞추는 PlacementTarget합니다.

종속성 속성 정보

식별자 필드 PlacementProperty
메타 데이터 속성 설정 true 없음

적용 대상

추가 정보