NavigationCommands.Zoom 속성

정의

Zoom 명령을 나타내는 값을 가져옵니다.Gets the value that represents the Zoom command.

public:
 static property System::Windows::Input::RoutedUICommand ^ Zoom { System::Windows::Input::RoutedUICommand ^ get(); };
public static System.Windows.Input.RoutedUICommand Zoom { get; }
member this.Zoom : System.Windows.Input.RoutedUICommand
Public Shared ReadOnly Property Zoom As RoutedUICommand

속성 값

라우트된 UIUI 명령입니다.The routed UIUI command.

기본값Default Values
키 제스처Key Gesture 해당 없음N/A
UI 텍스트UI Text 확대/축소Zoom

예제

다음 예제에서는 응답 하는 코드를 구현 하는 방법을 보여 줍니다 합니다 Zoom 와 함께에서 명령을 FlowDocumentPageViewer합니다.The following example shows how to implement code that responds to the Zoom command in conjunction with a FlowDocumentPageViewer.

<Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="SDKSample.Zoom">
<FlowDocumentPageViewer Name="flowDocumentPageViewer" MinZoom="50" MaxZoom="200">

  <!-- Zoom Context Menu-->
  <FlowDocumentPageViewer.ContextMenu>
    <ContextMenu>
      <ContextMenu.CommandBindings>
        <CommandBinding
          Command="NavigationCommands.Zoom"
          CanExecute="navigationCommandZoom_CanExecute"
          Executed="navigationCommandZoom_Executed" />
      </ContextMenu.CommandBindings>
      <MenuItem Header="50%" Command="NavigationCommands.Zoom" CommandParameter="50" />
      <MenuItem Header="100%" Command="NavigationCommands.Zoom" CommandParameter="100" />
      <MenuItem Header="150%" Command="NavigationCommands.Zoom" CommandParameter="150" />
      <MenuItem Header="200%" Command="NavigationCommands.Zoom" CommandParameter="200" />
    </ContextMenu>
  </FlowDocumentPageViewer.ContextMenu>

  <FlowDocument>
    <!-- Document Content-->
    <Paragraph>
      Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed vulputate, lacus non sagittis pharetra, diam dolor dictum tellus, et hendrerit odio risus nec erat. Nam sollicitudin imperdiet mi. Sed rutrum. Morbi vel nunc. Donec imperdiet. Morbi hendrerit leo. Maecenas imperdiet. Curabitur viverra tempor nisi. Phasellus vitae augue sit amet neque venenatis elementum. Proin posuere lobortis quam. Curabitur et neque. Donec ac sem vitae libero pharetra luctus. Fusce purus. Nulla vehicula, leo commodo dictum lobortis, odio augue accumsan ante, id dictum nisi libero quis diam. Nam augue erat, malesuada eu, tincidunt eu, dictum ut, ante. In vel magna vel ligula faucibus lobortis. Praesent a felis non mi fringilla vulputate. Integer quis tellus cursus elit tincidunt vehicula. Morbi commodo sem eu eros. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;
    </Paragraph>
  </FlowDocument>
</FlowDocumentPageViewer>
</Window>

설명

이 명령은 확대/축소 수준을 설정 하려면 함을 나타냅니다.This command indicates the intention to set the zoom level.

응답에 대 한 구현은 합니다 Zoom 지정 된 모든 명령을 WPFWPF 클래스입니다.There is no implementation for responding to the Zoom command on any given WPFWPF class. 따라서이 예제에 나와 있는 적절 한 구현을 제공 해야 합니다.As such, you need to provide an appropriate implementation, which is shown in the example.

XAML 특성 사용XAML Attribute Usage

<object property="NavigationCommands.Zoom"/>  

적용 대상

추가 정보