Back to Devexpress

DocumentGroup.PinLocation Attached Property

wpf-devexpress-dot-xpf-dot-docking-dot-documentgroup-5600be10.md

latest5.3 KB
Original Source

DocumentGroup.PinLocation Attached Property

Specifies where the pinned tabbed DocumentPanel is located. This is an attached property.

Namespace : DevExpress.Xpf.Docking

Assembly : DevExpress.Xpf.Docking.v25.2.dll

NuGet Package : DevExpress.Wpf.Docking

Declaration

See GetPinLocation(DependencyObject) and SetPinLocation(DependencyObject, TabHeaderPinLocation).

Returns

TypeDescription
TabHeaderPinLocation

A TabHeaderPinLocation object that specifies where the pinned tabbed DocumentPanel is located.

|

Remarks

The DocumentGroup object contains child DocumentPanel objects that allow you to create a tabbed or MDI interface. To create a tabbed interface, set the DocumentGroup.MDIStyle property to MDIStyle.Tabbed.

If DocumentPanels are shown as tabs, they can display Pin buttons that allow an end user to pin and unpin a current tab at runtime. Pinned tabs are stacked to either the left or right side. The figure below illustrates an example.

You can use the PinLocation attached property to specify where the pinned tabs are located.

Example

In XAML

The following code sample sets the DocumentGroup.PinLocation attached property to specify the pinned tab location:

xaml
<dx:ThemedWindow 
  ...
  xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
  xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
  <dxdo:DockLayoutManager>
    <dxdo:LayoutGroup>
      <dxdo:DocumentGroup x:Name="Group1" Caption="DocumentGroup" >
         <dxdo:DocumentPanel x:Name="Document1" Caption="Document1" dxdo:DocumentGroup.PinLocation="Near"/>
         <dxdo:DocumentPanel x:Name="Document2" Caption="Document2"/>
         <dxdo:DocumentPanel x:Name="Document3" Caption="Document3"/>
         <dxdo:DocumentPanel x:Name="Document4" Caption="Document4" dxdo:DocumentGroup.PinLocation="Far"/>
      </dxdo:DocumentGroup>
    </dxdo:LayoutGroup>
  </dxdo:DockLayoutManager>
</dx:ThemedWindow>

In Code

Use the DocumentGroup.SetPinLocation and the DocumentGroup.GetPinLocation methods to specify the pinned tab location:

xaml
<dx:ThemedWindow 
  ...
  xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
  xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
  <dxdo:DockLayoutManager>
    <dxdo:LayoutGroup>
      <dxdo:DocumentGroup x:Name="Group1" Caption="DocumentGroup" >
         <dxdo:DocumentPanel x:Name="Document1" Caption="Document1"/>
         <dxdo:DocumentPanel x:Name="Document2" Caption="Document2" dxdo:DocumentGroup.PinLocation="Near"/>
         <dxdo:DocumentPanel x:Name="Document3" Caption="Document3"/>
         <dxdo:DocumentPanel x:Name="Document4" Caption="Document4"/>
      </dxdo:DocumentGroup>
    </dxdo:LayoutGroup>
  </dxdo:DockLayoutManager>
</dx:ThemedWindow>
csharp
DevExpress.Xpf.Docking.DocumentGroup.SetPinLocation(Document1, DevExpress.Xpf.Layout.Core.TabHeaderPinLocation.Near);
DevExpress.Xpf.Docking.DocumentGroup.SetPinLocation(Document4, DevExpress.Xpf.Layout.Core.TabHeaderPinLocation.Far);
DevExpress.Xpf.Docking.DocumentGroup.GetPinLocation(Document2);
vb
DevExpress.Xpf.Docking.DocumentGroup.SetPinLocation(Document1, DevExpress.Xpf.Layout.Core.TabHeaderPinLocation.Near)
DevExpress.Xpf.Docking.DocumentGroup.SetPinLocation(Document4, DevExpress.Xpf.Layout.Core.TabHeaderPinLocation.Far)
DevExpress.Xpf.Docking.DocumentGroup.GetPinLocation(Document2)

See Also

Pinned

ShowPinButton

SetPinLocation(DependencyObject, TabHeaderPinLocation)

GetPinLocation(DependencyObject)

DocumentGroup Class

DocumentGroup Members

DevExpress.Xpf.Docking Namespace