NonUniqueControlNameException Class
Occurs when the restored layout contains documents with duplicate ControlName properties.
Namespace: DevExpress.XtraBars.Docking2010.Views
Assembly: DevExpress.XtraBars.v24.2.dll
Declaration
[LogifyIgnoreException]
public class NonUniqueControlNameException :
RestoreLayoutException
Remarks
Follow the steps below to fix this exception:
- Handle the BaseView.RestoreLayoutError event.
- Assign a new unique name to the NonUniqueControlNameException.ControlName property.
void tabbedView1_RestoreLayoutError(object sender, DevExpress.Utils.Serializing.RestoreLayoutErrorEventArgs e) {
foreach (var exception in e.Exceptions) {
if (exception is NonUniqueControlNameException nonUniqueException)
nonUniqueException.ControlName = $"{nonUniqueException.ControlName}_1";
}
e.Throw = false;
}
Inheritance
Object
Exception
SystemException
InvalidOperationException
DevExpress.Utils.Serializing.RestoreLayoutException
NonUniqueControlNameException
See Also