如何为 Avalondock LayoutAnchorablePane 设置宽度
how to set width for Avalondock LayoutAnchorablePane
我有一组LayoutAnchorablePaneGroup
如下,
<xcad:LayoutRoot>
<xcad:LayoutPanel Orientation="Horizontal">
<xcad:LayoutAnchorablePaneGroup Orientation="Horizontal" >
<xcad:LayoutAnchorablePane DockWidth="150">
<xcad:LayoutAnchorable Title="Folder" CanClose="False">
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
<xcad:LayoutAnchorablePaneGroup Orientation="Horizontal" >
<xcad:LayoutAnchorablePane DockWidth="450">
<xcad:LayoutAnchorable Title="Documents" CanClose="False">
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
<xcad:LayoutAnchorablePaneGroup Orientation="Vertical" >
<xcad:LayoutAnchorablePane DockWidth="200">
<xcad:LayoutAnchorable Title="Properties" CanClose="False">
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
<xcad:LayoutAnchorablePane >
<xcad:LayoutAnchorable Title="Search" CanClose="False">
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
<xcad:LayoutAnchorablePaneGroup Orientation="Horizontal" >
<xcad:LayoutAnchorablePane DockWidth="*">
<xcad:LayoutAnchorable Title="Viewer" CanClose="False">
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
</xcad:LayoutPanel>
</xcad:LayoutRoot>
我想设置每个 LayoutAnchorablePane
的宽度。
我试过在组级别设置它没有效果。
注意:我没有 LayoutDocumentPane
如果我添加了 LayoutDocumentPane
我能够正确获得宽度。
任何帮助
我做了一些研究并提出了 Grid
和 DockPanel
的解决方案
<DockPanel Grid.Row="2" FlowDirection="LeftToRight" LastChildFill="True" SnapsToDevicePixels="True" WindowChrome.ResizeGripDirection="TopLeft" >
<xcad:DockingManager DockPanel.Dock="Left" Grid.Row="2" BorderBrush="Black" BorderThickness="1" >
<xcad:LayoutRoot>
<xcad:LayoutPanel Orientation="Horizontal">
<xcad:LayoutAnchorablePaneGroup Orientation="Horizontal" DockMinWidth="150" >
<xcad:LayoutAnchorablePane >
<xcad:LayoutAnchorable Title="Folder">
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
<xcad:LayoutAnchorablePaneGroup Orientation="Horizontal" DockMinWidth="450" >
<xcad:LayoutAnchorablePane >
<xcad:LayoutAnchorable Title="Documents" >
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
<xcad:LayoutAnchorablePaneGroup Orientation="Vertical" DockMinWidth="200" >
<xcad:LayoutAnchorablePane >
<xcad:LayoutAnchorable Title="Properties" >
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
<xcad:LayoutAnchorablePane >
<xcad:LayoutAnchorable Title="Search" >
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
</xcad:LayoutPanel>
</xcad:LayoutRoot>
</xcad:DockingManager>
</DockPanel>
我有一组LayoutAnchorablePaneGroup
如下,
<xcad:LayoutRoot>
<xcad:LayoutPanel Orientation="Horizontal">
<xcad:LayoutAnchorablePaneGroup Orientation="Horizontal" >
<xcad:LayoutAnchorablePane DockWidth="150">
<xcad:LayoutAnchorable Title="Folder" CanClose="False">
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
<xcad:LayoutAnchorablePaneGroup Orientation="Horizontal" >
<xcad:LayoutAnchorablePane DockWidth="450">
<xcad:LayoutAnchorable Title="Documents" CanClose="False">
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
<xcad:LayoutAnchorablePaneGroup Orientation="Vertical" >
<xcad:LayoutAnchorablePane DockWidth="200">
<xcad:LayoutAnchorable Title="Properties" CanClose="False">
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
<xcad:LayoutAnchorablePane >
<xcad:LayoutAnchorable Title="Search" CanClose="False">
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
<xcad:LayoutAnchorablePaneGroup Orientation="Horizontal" >
<xcad:LayoutAnchorablePane DockWidth="*">
<xcad:LayoutAnchorable Title="Viewer" CanClose="False">
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
</xcad:LayoutPanel>
</xcad:LayoutRoot>
我想设置每个 LayoutAnchorablePane
的宽度。
我试过在组级别设置它没有效果。
注意:我没有 LayoutDocumentPane
如果我添加了 LayoutDocumentPane
我能够正确获得宽度。
任何帮助
我做了一些研究并提出了 Grid
和 DockPanel
<DockPanel Grid.Row="2" FlowDirection="LeftToRight" LastChildFill="True" SnapsToDevicePixels="True" WindowChrome.ResizeGripDirection="TopLeft" >
<xcad:DockingManager DockPanel.Dock="Left" Grid.Row="2" BorderBrush="Black" BorderThickness="1" >
<xcad:LayoutRoot>
<xcad:LayoutPanel Orientation="Horizontal">
<xcad:LayoutAnchorablePaneGroup Orientation="Horizontal" DockMinWidth="150" >
<xcad:LayoutAnchorablePane >
<xcad:LayoutAnchorable Title="Folder">
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
<xcad:LayoutAnchorablePaneGroup Orientation="Horizontal" DockMinWidth="450" >
<xcad:LayoutAnchorablePane >
<xcad:LayoutAnchorable Title="Documents" >
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
<xcad:LayoutAnchorablePaneGroup Orientation="Vertical" DockMinWidth="200" >
<xcad:LayoutAnchorablePane >
<xcad:LayoutAnchorable Title="Properties" >
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
<xcad:LayoutAnchorablePane >
<xcad:LayoutAnchorable Title="Search" >
...
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
</xcad:LayoutPanel>
</xcad:LayoutRoot>
</xcad:DockingManager>
</DockPanel>