BarManager.CreateStandardLayout Property
Gets or sets whether the bar manager implicitly creates four BarContainerControls at the four edges of the BarManager control, allowing you to dock Bars at these positions. This is a dependency property.
Namespace: DevExpress.Xpf.Bars
Assembly: DevExpress.Xpf.Core.v20.1.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.Core, DevExpress.Wpf.Core
Declaration
Property Value
Type | Description |
---|---|
Boolean | true, if the bar manager implicitly creates four BarContainerControls; otherwise, false. |
Remarks
By default, the CreateStandardLayout option is set to true. In this mode, four default bar containers (BarContainerControls) are implicitly created along the edges of the BarManager. These containers have the BarContainerControl.ContainerType property set to BarContainerType.Top, BarContainerType.Bottom, BarContainerType.Left and BarContainerType.Right respectively.
You can define a Bar object in the BarManager.Bars collection, and dock this bar to any of these default containers by setting the Bar.DockInfo.ContainerType (BarDockInfo.ContainerType) property to Top, Bottom, Left or Right.
Besides the default containers, you can manually add any number of BarContainerControls to the window. A Bar object, defined in the BarManager.Bars collection, can be docked to these containers using the Bar.DockInfo.Container (BarDockInfo.Container) or Bar.DockInfo.ContainerName (BarDockInfo.ContainerName) properties.
See the BarContainerControl topic to learn more.
Example
This example shows how to get and focus an editor embedded into a bar.In the example bars are added to BarContainers that are automatically created by setting the BarManager.CreateStandardLayout property to True.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-get-and-focus-an-in-place-editor-e1557.
<!--Set CreateStandardLayout to True to create four BarContainers
at the top, left, right, and bottom edges-->
<dxb:BarManager CreateStandardLayout="True" Margin="12" Name="barManager1">
<dxb:BarManager.Items>
<dxb:BarButtonItem x:Name="btn" Content="button" ItemClick="btn_ItemClick" />
<dxb:BarEditItem x:Name="beiEditor" EditValue="text">
<dxb:BarEditItem.EditSettings>
<dxe:TextEditSettings></dxe:TextEditSettings>
</dxb:BarEditItem.EditSettings>
</dxb:BarEditItem>
</dxb:BarManager.Items>
<dxb:BarManager.Bars>
<dxb:Bar x:Name="topBar" Caption="Top Bar">
<!--Display the bar within the top BarContainer-->
<dxb:Bar.DockInfo>
<dxb:BarDockInfo ContainerType="Top" />
</dxb:Bar.DockInfo>
<dxb:Bar.ItemLinks>
<dxb:BarButtonItemLink BarItemName="btn" />
<dxb:BarEditItemLink BarItemName="beiEditor" />
</dxb:Bar.ItemLinks>
</dxb:Bar>
<dxb:Bar x:Name="leftBar" Caption="Left Bar">
<!--Display the bar within the left BarContainer-->
<dxb:Bar.DockInfo>
<dxb:BarDockInfo ContainerType="Left" />
</dxb:Bar.DockInfo>
<dxb:Bar.ItemLinks>
<dxb:BarButtonItemLink BarItemName="btn" />
</dxb:Bar.ItemLinks>
</dxb:Bar>
</dxb:BarManager.Bars>
<RichTextBox></RichTextBox>
</dxb:BarManager>
private void btn_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e) {
(beiEditor.Links[0] as BarEditItemLink).Editor.Focus();
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CreateStandardLayout property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.