Back to Devexpress

DocumentGroup.ShowPinButton Attached Property

wpf-devexpress-dot-xpf-dot-docking-dot-documentgroup-1bac2f40.md

latest5.8 KB
Original Source

DocumentGroup.ShowPinButton Attached Property

Gets or sets whether the Pin button on the tabbed DocumentPanel is visible. This is an attached and a dependency property.

Namespace : DevExpress.Xpf.Docking

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

NuGet Package : DevExpress.Wpf.Docking

Declaration

See GetShowPinButton(DependencyObject) and SetShowPinButton(DependencyObject, Boolean).

Returns

TypeDescription
Boolean

true, if the Pin button on the tabbed DocumentPanel is visible; otherwise, false.

|

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 represented 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 depending on the DocumentGroup.PinLocation property value. The figure below illustrates an example.

To specify the pin button visibility in XAML mark-up, use the ShowPinButton attached property. To do the same from code, use the DocumentGroup.SetShowPinButton and DocumentGroup.GetShowPinButton methods. The code below illustrates an example.

xaml
<dxdo:DockLayoutManager>
   <dxdo:LayoutGroup>
      <dxdo:DocumentGroup x:Name="DocumentGroup" Caption="DocumentGroup" MDIStyle="Tabbed">
          <dxdo:DocumentPanel x:Name="Document1" Caption="Document1" dxdo:DocumentGroup.ShowPinButton="True"/>
          <dxdo:DocumentPanel x:Name="Document2" Caption="Document2" dxdo:DocumentGroup.ShowPinButton="False"/>
          <dxdo:DocumentPanel x:Name="Document3" Caption="Document3" dxdo:DocumentGroup.ShowPinButton="True"/>
      </dxdo:DocumentGroup>
   </dxdo:LayoutGroup>
</dxdo:DockLayoutManager>
csharp
DevExpress.Xpf.Docking.DocumentGroup.SetShowPinButton(Document1, true);
DevExpress.Xpf.Docking.DocumentGroup.SetShowPinButton(Document2, false);
DevExpress.Xpf.Docking.DocumentGroup.SetShowPinButton(Document3, DevExpress.Xpf.Docking.DocumentGroup.GetShowPinButton(Document1));
vb
DevExpress.Xpf.Docking.DocumentGroup.SetShowPinButton(Document1, True)
DevExpress.Xpf.Docking.DocumentGroup.SetShowPinButton(Document2, False)
DevExpress.Xpf.Docking.DocumentGroup.SetShowPinButton(Document3, DevExpress.Xpf.Docking.DocumentGroup.GetShowPinButton(Document1))

To manually specify whether tabs are pinned or unpinned in an XAML mark-up, use the DocumentGroup.Pinned attached property. To do the same from code, use the DocumentGroup.SetPinned and DocumentGroup.GetPinned methods. The code below illustrates an example.

xaml
<dxdo:DockLayoutManager>
   <dxdo:LayoutGroup>
      <dxdo:DocumentGroup x:Name="DocumentGroup" Caption="DocumentGroup" MDIStyle="Tabbed">
          <dxdo:DocumentPanel x:Name="Document1" Caption="Document1" dxdo:DocumentGroup.Pinned="True"/>
          <dxdo:DocumentPanel x:Name="Document2" Caption="Document2"/>
          <dxdo:DocumentPanel x:Name="Document3" Caption="Document3" dxdo:DocumentGroup.Pinned="False"/>
      </dxdo:DocumentGroup>
   </dxdo:LayoutGroup>
</dxdo:DockLayoutManager>
csharp
DevExpress.Xpf.Docking.DocumentGroup.SetPinned(Document1, true);
DevExpress.Xpf.Docking.DocumentGroup.SetPinned(Document2, false);
DevExpress.Xpf.Docking.DocumentGroup.SetPinned(Document3, DevExpress.Xpf.Docking.DocumentGroup.GetPinned(Document2));
vb
DevExpress.Xpf.Docking.DocumentGroup.SetPinned(Document1, True)
DevExpress.Xpf.Docking.DocumentGroup.SetPinned(Document2, False)
DevExpress.Xpf.Docking.DocumentGroup.SetPinned(Document3, DevExpress.Xpf.Docking.DocumentGroup.GetPinned(Document2))

See Also

SetShowPinButton(DependencyObject, Boolean)

GetShowPinButton(DependencyObject)

Pinned

PinLocation

DocumentGroup Class

DocumentGroup Members

DevExpress.Xpf.Docking Namespace