2013-07-10 47 views
3

顯示爲LayoutDocument的製表符有短標題,如AA,AB,AC。因此,他們的標籤尺寸相對較小。Avalondock如何設置LayoutDocument的製表符寬度

有沒有辦法爲選項卡手動設置固定寬度?

<avalonDock:DockingManager x:Name="DockManager" AllowMixedOrientation="True"> 
     <avalonDock:DockingManager.Theme> 
      <themes:AeroTheme/> 
     </avalonDock:DockingManager.Theme> 

     <avalonDock:LayoutRoot>      
      <avalonDock:LayoutPanel Orientation="Horizontal"> 
       <avalonDock:LayoutDocumentPaneGroup> 
        <avalonDock:LayoutDocumentPane > 
         <avalonDock:LayoutDocument Title="AA" CanClose="False" > 
          <my:LGDCSimulator/> 
         </avalonDock:LayoutDocument> 
         <avalonDock:LayoutDocument Title="AB" CanClose="False"> 
          <my:OtherCompanyDCSimulator/> 
         </avalonDock:LayoutDocument> 
        </avalonDock:LayoutDocumentPane> 
       </avalonDock:LayoutDocumentPaneGroup> 
      </avalonDock:LayoutPanel> 
     </avalonDock:LayoutRoot> 
    </avalonDock:DockingManager> 

enter image description here

回答

3

您可以爲所有LayoutDocumentDockingManager資源全局設置寬度:

<avalonDock:DockingManager x:Name="DockManager" AllowMixedOrientation="True"> 
    <avalonDock:DockingManager.Resources> 
     <Style TargetType="{x:Type avalonDock:LayoutDocumentTabItem}"> 
      <Setter Property="Width" Value="120" />     
     </Style> 
    </avalonDock:DockingManager.Resources> 
    <avalonDock:DockingManager.Theme> 
     <avalonDock:AeroTheme/> 
    </avalonDock:DockingManager.Theme> 
    ...