This is a migrated thread and some comments may be shown as answers.

System.CrossAppDomainMarshaledException Docking

3 Answers 72 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Marlos Távora
Top achievements
Rank 1
Marlos Távora asked on 16 Jun 2010, 01:31 PM
Hello, I am getting the following message when loading a page in my docking:

System.CrossAppDomainMarshaledException was unhandled
Message: System.ArgumentNullException: Value cannot be null.
Parameter Name: Text
   em System.Windows.Controls.TextBox.set_Text(String value)
   em Cockpit.Controls.ErrorWindow..ctor(String message, String details)
   em Cockpit.App.ReportError(String message, String details)
   em Cockpit.App.Application_UnhandledException(Object sender, ApplicationUnhandledExceptionEventArgs e)
   em MS.Internal.Error.CallApplicationUEHandler(Exception e)
   em MS.Internal.Error.CallAUEHandler(UInt32 hr, UInt32& bIsHandled)

Some idea of the cause of the problem?

My page:

<UserControl x:Class="MyProject.MyView" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
    xmlns:radDock="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" 
    xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
    xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
    xmlns:vm="clr-namespace:Cockpit.ViewModel" 
    mc:Ignorable="d" 
    d:DesignHeight="300" d:DesignWidth="600"
    <UserControl.Resources> 
        <vm:ViewQueryViewModel x:Key="MyViewModel"/> 
    </UserControl.Resources> 
    <Grid x:Name="LayoutRoot" DataContext="{StaticResource MyViewModel}"
        
        <radDock:RadDocking x:Name="radDocking"
        </radDock:RadDocking> 
    </Grid> 
</UserControl> 

My code where initialize the page:

UserControl content = (UserControl)Activator.CreateInstance(typeof(MyView), new object[] { obj.Id }); 
Document document = new Document(content, obj.Key.ToString(), obj.Name, "/MyProject;component/Assets/Images/Objetos/image1.png"); 
this.Documents.Add(document); 
this.groupDocuments.Items.Add(document); 



3 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 21 Jun 2010, 08:34 AM
Hello Marlos Távora,

Could you send us example were we can reproduce this error?
(You have to open a support ticket in order to attach files)

Kind regards,
Hristo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Marlos
Top achievements
Rank 1
answered on 29 Jul 2010, 02:42 PM
My usercontrol you find yourself within that structure

<radDock:RadDocking x:Name="docking"  Background="{x:Null}" BorderBrush="{x:Null}" BorderThickness="0" Padding="0" Close="docking_Close" Margin="0,5,0,0">
            <radDock:RadDocking.DocumentHost>
                <radDock:RadSplitContainer>
                    <radDock:RadPaneGroup x:Name="groupDocuments"  Background="#eaf1f9" >
 
                    </radDock:RadPaneGroup>
                </radDock:RadSplitContainer>
            </radDock:RadDocking.DocumentHost>
        <radDock:RadSplitContainer radDock:DockingPanel.InitialSize="225,300" MaxWidth="600"
                    Name="LeftContainer" InitialPosition="DockedLeft">
        ...
        </radDock:RadSplitContainer>
</radDock:RadDocking>

The document is added to the codebehind RadPaneGroup through the following statement:

UserControl content = (UserControl)Activator.CreateInstance(typeof(ViewPanel), new object[] { obj.Id });
                        Document document = new Document(content, obj.Key.ToString(),       obj.Name, "/Cockpit;component/Assets/Images/Objetos/dataconnector.png");
                        this.Documents.Add(document);
                        this.groupDocuments.Items.Add(document);

Where Document class extend RadDocumentPane.

Some idea of the cause of the problem?

0
George
Telerik team
answered on 03 Aug 2010, 03:20 PM
Hello Marlos,

Thank you for getting back to us.

Your code looks fine. I tested your scenario and everything works fine on my side. Could you try with the ddls from our latest release (Q2 2010) whether the problem still persists. We need more detailed information about the issue. If you could give us some a sample project that reproduces the problem it would be very helpful.

I will be glad to assist you further.

Greetings,
George
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Docking
Asked by
Marlos Távora
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Marlos
Top achievements
Rank 1
George
Telerik team
Share this question
or