LayoutPanel.Uri Property
Gets a System.Uri object used to assign the current LayoutPanel‘s content. This is a dependency property.
Namespace: DevExpress.Xpf.Docking
Assembly: DevExpress.Xpf.Docking.v24.1.dll
NuGet Package: DevExpress.Wpf.Docking
Declaration
Property Value
Type | Description |
---|---|
Uri | A System.Uri object used to assign the current LayoutPanel‘s content. |
Remarks
You can load the content of an external Window, Page, User Control into LayoutPanel objects. To do this, set a LayoutPanel’s ContentItem.Content inherited property to a System.Uri object that is referred to a corresponding XAML file. If a System.Uri object is used to specify the LayoutPanel‘s content, the Uri property returns the assigned System.Uri object.
Depending on the XAML file contents, the LayoutPanel.Control and LayoutPanel.Layout properties return different values:
- If a System.Uri object refers to a XAML file that contains a UserControl, the LayoutPanel.Control property returns this UserControl and the LayoutPanel.Layout property returns null.
- If a loaded XAML file contains a Window or Page, the LayoutPanel.Control property returns the root element of the Window/Page and the LayoutPanel.Layout property returns null.
For more details, see the ContentItem.Content property.
The following code sample specifies the Uri property to display the GridViewPanel view’s content in the LayoutPanel:
<dx:ThemedWindow ...
xmlns:Views="clr-namespace:LayoutPanel_URI.Views"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
<Grid>
<dxdo:DockLayoutManager>
<dxdo:LayoutGroup Caption="LayoutRoot">
<dxdo:LayoutPanel
x:Name="gridViewPanel"
Caption="GridView"
Content="{dxdo:RelativeUri 'LayoutPanel_URI;component/Views/GridViewPanel.xaml'}" />
</dxdo:LayoutGroup>
</dxdo:DockLayoutManager>
</Grid>
</dx:ThemedWindow>