Export (0) Print
Expand All

FlowDocumentScrollViewer.IsToolBarVisible Property

Gets or sets a value that indicates whether the FlowDocumentScrollViewer toolbar is visible.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

'Declaration
Public Property IsToolBarVisible As Boolean
'Usage
Dim instance As FlowDocumentScrollViewer
Dim value As Boolean

value = instance.IsToolBarVisible

instance.IsToolBarVisible = value
/** @property */
public boolean get_IsToolBarVisible ()

/** @property */
public void set_IsToolBarVisible (boolean value)

public function get IsToolBarVisible () : boolean

public function set IsToolBarVisible (value : boolean)

<object IsToolBarVisible="bool" .../>

Property Value

true to indicate that the toolbar is visible; otherwise, false. The default value is false.

The following figure shows the FlowDocumentScrollViewer toolbar.

Screenshot: FlowDocumentScrollViewer Toolbar

By default, this toolbar is not shown.

The following example shows how to set the IsToolBarVisible attribute.

<FlowDocumentScrollViewer
  HorizontalScrollBarVisibility="Auto" 
  VerticalScrollBarVisibility="Auto" 
  IsSelectionEnabled="True" 
  IsToolBarVisible="True" 
  MinZoom="50" MaxZoom="1000"
  Zoom="120" ZoomIncrement="5"
>
  <FlowDocument>
    <Paragraph>
      Flow content...
    </Paragraph>
  </FlowDocument>
</FlowDocumentScrollViewer>

The following example shows how to set the IsToolBarVisible property programmatically.

FlowDocumentScrollViewer flowDocScrollViewer = new FlowDocumentScrollViewer();

// Enable content selection.
flowDocScrollViewer.IsSelectionEnabled = true;
// Enable the toolbar.
flowDocScrollViewer.IsToolBarVisible = true;

// Set zoom between 50% and 1000%.
flowDocScrollViewer.MinZoom = 50;
flowDocScrollViewer.MaxZoom = 1000;
// Set the zoom increment to 5%.
flowDocScrollViewer.ZoomIncrement = 5;
// Set the initial zoom to 120%.
flowDocScrollViewer.Zoom = 120;

FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run("Flow content...")));
flowDocScrollViewer.Document = flowDoc;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft