Skip to main content

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

public Uri Uri { get; }

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:

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>

View Example

See Also