Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.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