Export (0) Print
Expand All

FlowDocumentReader.SwitchViewingModeCommand Field

Gets the value that represents the Switch Viewing Mode command.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public static readonly RoutedUICommand SwitchViewingModeCommand
<object property="SwitchViewingMode"/>

Field Value

Type: System.Windows.Input.RoutedUICommand
The command.

The FlowDocumentReader class has built-in handling for this command (as well as built-in handling for a number of application and navigation commands). For more information on commanding and command binding, see Commanding Overview.

Rather than initiate this command, you can instead call SwitchViewingMode on the relevant FlowDocumentReader. The result is the same.

The Switch Viewing Mode command can either be parameterless, in which case the viewing mode advances to the next available viewing mode in the FlowDocumentReaderViewingMode enumeration sequence, or it can specify a viewing mode by naming the FlowDocumentReaderViewingMode in the RoutedUICommand command parameters. If used to set a command property in XAML, the command must be parameterless.

You could also use or respond to this command in a derived class, using either the built-in handling or replacing it with handling of your own. OnSwitchViewingModeCommand is a callback that you can use to change the class handling, without requiring changes to command bindings in the template or in instances.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft