ContextMenuService.HasDropShadow 연결된 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
그림자 효과를 사용할 수 있는지 여부를 ContextMenu 나타내는 값을 가져오거나 설정합니다.
see GetHasDropShadow, and SetHasDropShadow
see GetHasDropShadow, and SetHasDropShadow
see GetHasDropShadow, and SetHasDropShadow
예제
다음 예에서는 두 개의 단추에 동일한 ContextMenu 단추를 할당하고 , Placement, PlacementRectangle및 HorizontalOffsetVerticalOffset 속성을 설정HasDropShadow하여 각 단추에 대해 서로 다른 위치로 설정합니다ContextMenu.
<StackPanel>
<StackPanel.Resources>
<ContextMenu x:Key="myContextMenu">
<MenuItem Header="Item"/>
</ContextMenu>
</StackPanel.Resources>
<!--Both buttons use the same ContextMenu but use the
properties on ContextMenuService to position them
differently.-->
<Button ContextMenu="{StaticResource myContextMenu}"
ContextMenuService.HasDropShadow="False"
ContextMenuService.Placement="Relative"
ContextMenuService.HorizontalOffset="50"
ContextMenuService.VerticalOffset="-10">
button 1
</Button>
<Button ContextMenu="{StaticResource myContextMenu}"
ContextMenuService.HasDropShadow="True"
ContextMenuService.Placement="Right"
ContextMenuService.PlacementRectangle="0,0,30,30">
button 2
</Button>
</StackPanel>
설명
이 값이 ContextMenu 열리면 값이 .의 SystemParameters.DropShadow값으로 설정됩니다. 속성이 true .인 경우 SystemParameters.DropShadow 이 속성을 false설정해도 효과가 없습니다.
종속성 속성 정보
| Item | 가치 |
|---|---|
| 식별자 필드 | HasDropShadowProperty |
메타데이터 속성이 다음으로 설정됩니다. true |
없음 |