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 isfalse
.
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()
Updates the CanDragToLinkedDockSitesResolved value.
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
- DockingWindow.CanAttachProperty
- DockingWindow.CanAttachResolvedProperty
- DockingWindow.CanBecomeDocumentResolvedProperty
- DockingWindow.CanCloseProperty
- DockingWindow.CanCloseResolvedProperty
- DockingWindow.CanDockProperty
- DockingWindow.CanDockResolvedProperty
- DockingWindow.CanDragTabProperty
- DockingWindow.CanDragTabResolvedProperty
- DockingWindow.CanDragToLinkedDockSitesProperty
- DockingWindow.CanDragToLinkedDockSitesResolvedProperty
- DockingWindow.CanFloatProperty
- DockingWindow.CanFloatResolvedProperty
- DockingWindow.CanSerializeProperty
- DockingWindow.CanStandardMdiMaximizeProperty
- DockingWindow.CanStandardMdiMaximizeResolvedProperty
- DockingWindow.CanStandardMdiMinimizeProperty
- DockingWindow.CanStandardMdiMinimizeResolvedProperty
- DockingWindow.ContainerDockedSizeProperty
- DockingWindow.ContainerMaxSizeProperty
- DockingWindow.ContainerMinSizeProperty
- DockingWindow.DescriptionProperty
- DockingWindow.ImageSourceProperty
- DockingWindow.IsActiveProperty
- DockingWindow.IsFloatingProperty
- DockingWindow.IsOpenProperty
- DockingWindow.IsSelectedProperty
- DockingWindow.LastActiveDateTimeProperty
- DockingWindow.SerializationIdProperty
- DockingWindow.SizeToContentModesProperty
- DockingWindow.StandardMdiBoundsProperty
- DockingWindow.StandardMdiTitleBarContextContentTemplateProperty
- DockingWindow.StandardMdiWindowStateProperty
- DockingWindow.StateProperty
- DockingWindow.TabFlashColorProperty
- DockingWindow.TabFlashModeProperty
- DockingWindow.TabbedMdiLayoutKindProperty
- DockingWindow.TabbedMdiTabContextContentTemplateProperty
- DockingWindow.TabTextProperty
- DockingWindow.TabTextResolvedProperty
- DockingWindow.TabTintColorProperty
- DockingWindow.TabToolTipProperty
- DockingWindow.TitleProperty
- DockingWindow.UniqueIdProperty
- DockingWindow.WindowGroupNameProperty
- DockingWindow.DefaultLocationRequestedEvent
- DockingWindow.Activate()
- DockingWindow.Activate(bool)
- DockingWindow.Close()
- DockingWindow.CloseAllInContainer(bool)
- DockingWindow.CloseOthers(bool)
- DockingWindow.Destroy()
- DockingWindow.DragMove(InputPointerButtonEventArgs)
- DockingWindow.Float()
- DockingWindow.Float(Point)
- DockingWindow.Float(Size)
- DockingWindow.FloatAllInContainer()
- DockingWindow.MoveToFirst()
- DockingWindow.MoveToIndex(int)
- DockingWindow.MoveToLast()
- DockingWindow.MoveToLinkedDockSite(DockSite)
- DockingWindow.MoveToMdi()
- DockingWindow.MoveToMdi(DockHost)
- DockingWindow.MoveToNewHorizontalContainer()
- DockingWindow.MoveToNewVerticalContainer()
- DockingWindow.MoveToNextContainer()
- DockingWindow.MoveToPreviousContainer()
- DockingWindow.NotifyPropertyChanged(string)
- DockingWindow.OnDockSiteChanged(DockSite, DockSite)
- DockingWindow.OnIsSelectedChanged()
- DockingWindow.OnPropertyChanged(PropertyChangedEventArgs)
- DockingWindow.Open()
- DockingWindow.ToString()
- DockingWindow.UpdateCanBecomeDocumentResolved()
- DockingWindow.UpdateCommands()
- DockingWindow.OnDefaultLocationRequested(DockingWindowDefaultLocationEventArgs)
- DockingWindow.OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
- DockingWindow.ContainerMaxSizeResolved
- DockingWindow.ContainerMinSizeResolved
- DockingWindow.ActivateCommand
- DockingWindow.CanAttach
- DockingWindow.CanAttachResolved
- DockingWindow.CanBecomeDocumentResolved
- DockingWindow.CanClose
- DockingWindow.CanCloseResolved
- DockingWindow.CanDock
- DockingWindow.CanDockResolved
- DockingWindow.CanDragTab
- DockingWindow.CanDragTabResolved
- DockingWindow.CanDragToLinkedDockSites
- DockingWindow.CanDragToLinkedDockSitesResolved
- DockingWindow.CanFloat
- DockingWindow.CanFloatResolved
- DockingWindow.CanMoveToNewHorizontalContainer
- DockingWindow.CanMoveToNewVerticalContainer
- DockingWindow.CanMoveToNextContainer
- DockingWindow.CanMoveToPreviousContainer
- DockingWindow.CanMoveToPrimaryMdiHost
- DockingWindow.CanSerialize
- DockingWindow.CanStandardMdiMaximize
- DockingWindow.CanStandardMdiMaximizeResolved
- DockingWindow.CanStandardMdiMinimize
- DockingWindow.CanStandardMdiMinimizeResolved
- DockingWindow.CloseAllInContainerCommand
- DockingWindow.CloseCommand
- DockingWindow.CloseOthersCommand
- DockingWindow.ContainerDockedSize
- DockingWindow.ContainerMaxSize
- DockingWindow.ContainerMinSize
- DockingWindow.Description
- DockingWindow.DestroyCommand
- DockingWindow.DockHost
- DockingWindow.DockSite
- DockingWindow.FloatAllInContainerCommand
- DockingWindow.FloatCommand
- DockingWindow.ImageSource
- DockingWindow.IsActive
- DockingWindow.IsContainerForItem
- DockingWindow.IsFloating
- DockingWindow.IsOpen
- DockingWindow.IsSelected
- DockingWindow.LastActiveDateTime
- DockingWindow.MoveToMdiCommand
- DockingWindow.MoveToNewHorizontalContainerCommand
- DockingWindow.MoveToNewVerticalContainerCommand
- DockingWindow.MoveToNextContainerCommand
- DockingWindow.MoveToPreviousContainerCommand
- DockingWindow.MoveToPrimaryMdiHostCommand
- DockingWindow.OpenCommand
- DockingWindow.ParentContainer
- DockingWindow.SerializationId
- DockingWindow.SetTabbedMdiLayoutKindCommand
- DockingWindow.SizeToContentModes
- DockingWindow.StandardMdiBounds
- DockingWindow.StandardMdiTitleBarContextContentTemplate
- DockingWindow.StandardMdiWindowState
- DockingWindow.State
- DockingWindow.TabFlashColor
- DockingWindow.TabFlashMode
- DockingWindow.TabbedMdiLayoutKind
- DockingWindow.TabbedMdiTabContextContentTemplate
- DockingWindow.TabText
- DockingWindow.TabTextResolved
- DockingWindow.TabTintColor
- DockingWindow.TabToolTip
- DockingWindow.Title
- DockingWindow.UniqueId
- DockingWindow.WindowGroupName
- DockingWindow.PropertyChanged
- DockingWindow.DefaultLocationRequested