Completed
Last Updated: 04 Oct 2019 10:28 by ADMIN
Release LIB 2019.3.1007
Dinko
Created on: 18 Sep 2019 12:43
Category: Docking
Type: Bug Report
0
Docking: CustomElementLoading event can't be canceled without first creating a new instance of the custom element
The CustomElementLoading event can't be canceled without creating a new instance of the custom element.

As a workaround in the CustomElementLoading event handler you can call the SetAffectedElement() with creating DependencyObject and then Cancel the event by setting the Cancel property.
private void RadDockingOnCustomElementLoading(object sender, LayoutSerializationCustomLoadingEventArgs e)
{
    if (e.CustomElementTypeName == "MyRadPane")
    {
        e.SetAffectedElement(new DependencyObject());
        e.Cancel = true;              
    }
}
0 comments