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

LayoutControl.LayoutUri Property

Gets or sets a uniform resource identifier (URI) of the layout to be loaded. This is a dependency property.

Namespace: DevExpress.Xpf.LayoutControl

Assembly: DevExpress.Xpf.LayoutControl.v24.2.dll

NuGet Package: DevExpress.Wpf.LayoutControl

#Declaration

public Uri LayoutUri { get; set; }

#Property Value

Type Description
Uri

A Uri object that specifies a path to the layout to be loaded.

#Remarks

It’s possible to store a layout of items of a LayoutControl object in XML format to a file, and then load the saved layout by specifying the URI of the file via the LayoutUri property. Once a new value is assigned to the LayoutUri property, the LayoutControl automatically loads the layout.

Assume that a layout has been saved to file “Layout.xaml” and then added to the application project. To load this layout, you can use the following code:

myLayoutControl.LayoutUri = new Uri("Layout.xaml", UriKind.Relative);

The LayoutControl’s LayoutControlBase.WriteToXML method allows you to save the layout of items to a data store. To restore the layout, you can use the LayoutControl.ReadFromXML method.

See Also