In This Article

DocumentWindow Class

Represents a document window.

public class DocumentWindow : DockingWindow, IDockTarget
Inheritance:
object Visual UIElement FrameworkElement Control ContentControl DockingWindow object
Implements:
IDockTarget

Constructors

DocumentWindow()

Initializes a new instance of the DocumentWindow class. When creating instances of DocumentWindow programmatically, use a constructor that accepts a DockSite instead.

public DocumentWindow()

DocumentWindow(DockSite)

Initializes a new instance of the DocumentWindow class.

public DocumentWindow(DockSite dockSite)
Parameter Type Description
dockSite DockSite

The DockSite with which to register this window.

DocumentWindow(DockSite, string, string, ImageSource, object)

Initializes a new instance of the DocumentWindow class.

public DocumentWindow(DockSite dockSite, string serializationId, string title, ImageSource imageSource, object content)
Parameter Type Description
dockSite DockSite

The DockSite with which to register this window.

serializationId string

The serialization ID of the window, used during layout serialization.

title string

The title of the window.

imageSource ImageSource

The image source for the window's icon.

content object

The content of the window.

DocumentWindow(bool)

Initializes a new instance of the DocumentWindow class.

public DocumentWindow(bool isContainerForItem)
Parameter Type Description
isContainerForItem bool

Whether the window is a container for an item.

Properties

FileName

Gets or sets the full path to the document.

[Localizability(LocalizationCategory.NeverLocalize)]
public string FileName { get; set; }

Property Value

string:

The full path to the document.

Remarks

This property is displayed on switchers.

IsReadOnly

Gets or sets whether the document window is currently in a read-only state.

public bool IsReadOnly { get; set; }

Property Value

bool:

true if the document window is currently in a read-only state; otherwise, false. The default value is false.

Remarks

This flag is purely a visual cue to the end user that the contents of the document window are read-only.

Methods

Attach(IDockTarget)

Attaches the DocumentWindow to the specified target, generally making a tabbed group.

public void Attach(IDockTarget target)
Parameter Type Description
target IDockTarget

The IDockTarget against which to attach.

Remarks

The target must be another DocumentWindow or TabbedMdiContainer.

Dock(IDockTarget, Side)

Docks the DocumentWindow to the side of a specified target.

public void Dock(IDockTarget target, Side side)
Parameter Type Description
target IDockTarget

The IDockTarget that is the target of the dock.

side Side

The target's Side against which to dock.

Remarks

The target must be another DocumentWindow or TabbedMdiContainer. Use the Attach(IDockTarget) method to dock into a particular target.

Float(Point?, Size?)

Floats the DocumentWindow to the specified optional location and size.

public override void Float(Point? location, Size? size)
Parameter Type Description
location Point?

An optional System.Windows.Point specifying the target location of the floating dock host.

size Size?

An optional System.Windows.Size specifying the target size of the floating dock host.

Remarks

When location is not specified, it will float to a default location. When size is not specified, it will float with its current size. Using this method places the DocumentWindow in a new MDI host within a floating dock host.

OnCreateAutomationPeer()

Returns an AutomationPeer object for this control instance.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

An AutomationPeer instance.

OnStateChanged(DockingWindowState, DockingWindowState)

Occurs when the value of the State property has changed.

protected override void OnStateChanged(DockingWindowState oldValue, DockingWindowState newValue)
Parameter Type Description
oldValue DockingWindowState

The old value.

newValue DockingWindowState

The new value.

UpdateCanAttachResolved()

Updates the CanAttachResolved value.

protected override void UpdateCanAttachResolved()

UpdateCanCloseResolved()

Updates the CanCloseResolved value.

protected override void UpdateCanCloseResolved()

UpdateCanDockResolved()

Updates the CanDockResolved value.

protected override void UpdateCanDockResolved()

UpdateCanDragTabResolved()

Updates the CanDragTabResolved value.

protected override void UpdateCanDragTabResolved()

UpdateCanDragToLinkedDockSitesResolved()

protected override void UpdateCanDragToLinkedDockSitesResolved()

UpdateCanFloatResolved()

Updates the CanFloatResolved value.

protected override void UpdateCanFloatResolved()

Fields

FileNameProperty

Identifies the FileName dependency property. This field is read-only.

public static readonly DependencyProperty FileNameProperty

IsReadOnlyProperty

Identifies the IsReadOnly dependency property. This field is read-only.

public static readonly DependencyProperty IsReadOnlyProperty

Inherited Members