ToolTip.Placement 속성

정의

배치 대상 요소와 관련하여 ToolTip 의 위치를 지정하는 방법을 가져오거나 설정합니다.

public:
 property PlacementMode Placement { PlacementMode get(); void set(PlacementMode value); };
PlacementMode Placement();

void Placement(PlacementMode value);
public PlacementMode Placement { get; set; }
var placementMode = toolTip.placement;
toolTip.placement = placementMode;
Public Property Placement As PlacementMode
<ToolTip Placement="placementModeMemberName"/>

속성 값

PlacementMode 값 중 하나입니다.

예제

다음 코드 예제에서는 도구 설명의 배치 모드를 보여 줍니다.

<StackPanel Margin="120" >
    <TextBlock Text="ToolTip Control"/>
    <TextBlock Text="Hover over an item to see its ToolTip: " Margin="0,10"/>
    <ListBox Width="100" HorizontalAlignment="Left">
        <ListBoxItem Content="Left" 
            ToolTipService.ToolTip="ToolTip to the left." 
            ToolTipService.Placement="Left" />
        <ListBoxItem Content="Right" 
            ToolTipService.ToolTip="ToolTip to the right." 
            ToolTipService.Placement="Right" />
        <ListBoxItem Content="Top" 
            ToolTipService.ToolTip="ToolTip at the top." 
            ToolTipService.Placement="Top" />
        <ListBoxItem Content="Bottom" 
            ToolTipService.ToolTip="ToolTip at the bottom." 
            ToolTipService.Placement="Bottom"/>
        <ListBoxItem Content="Mouse" 
            ToolTipService.ToolTip="ToolTip based on the cursor position." 
            ToolTipService.Placement="Mouse"/>
    </ListBox>
</StackPanel>

설명

명시적 PlacementTarget이 없는 경우 ToolTip의 배치 대상은 ToolTip을 해당 ToolTipService.Tooltip 연결된 속성 값의 값으로 지정하는 요소이며 배치 값은 해당 대상에 적용됩니다.

Placement 및 PlacementTarget 은 일반적으로 기본값으로 남아 있습니다. 이러한 속성 중 하나 또는 둘 다를 지정하는 시나리오는 도구 설명이 도구 설명이 표시되는 동안 참조하는 콘텐츠를 가리는 경우를 방지하려는 경우입니다.

적용 대상

추가 정보